|
From: <rhu...@ih...> - 2010-09-28 15:38:21
|
In a previous post I was adding the underlying y-values as labels to the bars. For some bars that were shorter I want to change the label offset. I tried some things and none worked, is it possible to change the offset this way? poff(t) = sprintf( 'off gr 0,%f',(t < 20000) ? 0.04 : 0.00) plot 'immigration.dat' using 6:xtic(1) title col, \ '' u 12 ti col, '' u 13 ti col, '' u 14 ti col, \ '' u (($0-1)-0.3):6:6 w labels left rot by -90 offset graph 0,0.02 notitle, \ '' u (($0-1)-0.1):12:12 w labels left rot by -90 poff($12) not, \ '' u (($0-1)+0.1):13:13 w labels left rot by -90 off gr 0,0.02 not, \ '' u (($0-1)+0.3):14:14 w labels left rot by -90 off gr 0,0.02 not and I tried this plot 'immigration.dat' using 6:xtic(1) title col, \ '' u 12 ti col, '' u 13 ti col, '' u 14 ti col, \ '' u (($0-1)-0.3):6:6 w labels left rot by -90 offset graph 0,0.02 notitle, \ '' u (($0-1)-0.1):12:12 w labels left rot by -90 off gr 0,($12 < 20000) ? 0.04 : 0.00) not, \ '' u (($0-1)+0.1):13:13 w labels left rot by -90 off gr 0,0.02 not, \ '' u (($0-1)+0.3):14:14 w labels left rot by -90 off gr 0,0.02 not I also tried macros and substitutions with no success. gnuplot> show version long Version 4.4 patchlevel 1 <-snip-snip> Compile options: +READLINE -LIBREADLINE +HISTORY -BACKWARDS_COMPATIBILITY +BINARY_DATA +GD_PNG +GD_JPEG +GD_TTF +GD_GIF +ANIMATION -NOCWDRC +X11 +X11_POLYGON +MULTIBYTE +X11_EXTERNAL +USE_MOUSE +HIDDEN3D_QUADTREE +DATASTRINGS +HISTOGRAMS +OBJECTS +STRINGVARS +MACROS +IMAGE -- |