|
From: Thomas S. <t.s...@fz...> - 2010-02-07 15:53:27
|
you only change the y-values for the labels, *not* for the boxes stevecoh1 wrote: > > But I don't WANT to change the Y Values. I want boxes extending up from > the x axis when the y value is positive and down from the x-axis when y > is negative, with the labels placed accordingly. > > Here is my dataset (comma delimited): > Roosevelt/Truman 1945-1949,-24.3 > Truman 1949-1953,-21.9 > Eisenhower 1953-1957,-10.8 > Johnson 1965-1969,-8.3, > Kennedy/Johnson 1961-1965,-8.2 > Clinton 1997-2001,-8.2 > Eisenhower 1957-1961,-5.4 > Carter 1977-1981,-3.2 > Nixon 1969-1973,-2.9 > Clinton 1993-1997,-0.6 > Nixon-Ford 1973-1977,0.1 > GW Bush 2001-2005,6.9 > Reagan 1985-1989,9.2 > GW Bush 2005-2009,11.2 > Reagan 1981-1985,11.3 > GHW Bush 1989-1993,13.1 > > The first column are used as xtics (rotated by -45), the second column > are used for the box heights and the data labels. > > The data is presorted by the second column. Perhaps I can break this up > into two data series (the first with negative values and the second with > positive values) that would somehow be plotted next to rather than on > top of one another, with different offset values, so that the desired > label placement can be obtained over the whole set? Would that be > possible? > > Thomas Sefzick wrote: >> the offset is fixed, but you may change the y-value: >> plot 'datafile' using ... with boxes, '' using 0:($2>0.?$2:0.0):1 with >> labels left rotate by 90 >> >> >> stevecoh1 wrote: >>> I am plotting a graph with boxes whose y values fall above and below 0. >>> I want to show data labels above the boxes, but the >>> plot .. with labels offset x,y seems only to accept constants, not a >>> variable or a function or an expression. All I need is something like >>> "offset 0,($2/abs($2)). Is this doable? >>> >>> ------------------------------------------------------------------------------ >>> The Planet: dedicated and managed hosting, cloud storage, colocation >>> Stay online with enterprise data centers and the best network in the >>> business >>> Choose flexible plans and management services without long-term >>> contracts >>> Personal 24x7 support from experience hosting pros just a phone call >>> away. >>> http://p.sf.net/sfu/theplanet-com >>> _______________________________________________ >>> gnuplot-info mailing list >>> gnu...@li... >>> https://lists.sourceforge.net/lists/listinfo/gnuplot-info >>> >>> >> > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the > business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > -- View this message in context: http://old.nabble.com/variable-label-offset-tp27489059p27489824.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |