|
From: <rhu...@ih...> - 2010-09-26 21:26:50
|
I just want to plot the underlying data for each bar on the bar itself. Can someone show me how to do so using this page? http://www.bmsc.washington.edu/people/merritt/gnuplot/ go down to: Histogramming Tabular Data On that histogram I would like to plot the y-values on the bars. I am using: 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 -- |
|
From: Thomas S. <t.s...@fz...> - 2010-09-27 08:41:24
|
extend the plot command a little bit: plot 'immigration.dat' using 6:xtic(1) title col, \ '' u 12 ti col, '' u 13 ti col, '' u 14 ti col, \ '' using (($0-1)-0.3):6:6 with labels left rotate by 90 offset graph 0,0.02 notitle, \ '' u (($0-1)-0.1):12:12 w labels left rot by 90 off gr 0,0.02 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 rhubbell wrote: > > > I just want to plot the underlying data for each bar on the bar itself. > Can someone show me how to do so using this page? > > http://www.bmsc.washington.edu/people/merritt/gnuplot/ > > go down to: Histogramming Tabular Data > > On that histogram I would like to plot the y-values on the bars. > > > I am using: > > 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 > > > -- > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > -- View this message in context: http://old.nabble.com/Basic-question%3A-how-to-plot-the-data-on-a-bar-chart--tp29814263p29815730.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: <rhu...@ih...> - 2010-09-27 16:15:16
|
Thanks this gets me much closer. I don't feel so bad now. That isn't as simple as I had expected. Now I need to figure out how to add some additional logic to position the label for those bars that are shorter than the number of chars in the label. I think I can use a -/+ offset based on the bar size. I tried gnuplot> help $0 But didn't turn up anything and the mention of $0 in the doc wasn't enough. Is the $0 in this case relative? i.e. is it the position on the x-axis of the x-value from "using"? I thought $1 was the first column of the data file so $0 is still unclear to me. One thing I found was that the Index in the 4.4 gnuplot.pdf is empty/blank. Intentional? Or a bug? On Mon, 27 Sep 2010 01:41:17 -0700 (PDT) Thomas Sefzick <t.s...@fz...> wrote: > > extend the plot command a little bit: > > plot 'immigration.dat' using 6:xtic(1) title col, \ > '' u 12 ti col, '' u 13 ti col, '' u 14 ti col, \ > '' using (($0-1)-0.3):6:6 with labels left rotate by 90 offset graph > 0,0.02 notitle, \ > '' u (($0-1)-0.1):12:12 w labels left rot by 90 off gr 0,0.02 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 > > > rhubbell wrote: > > > > > > I just want to plot the underlying data for each bar on the bar itself. > > Can someone show me how to do so using this page? > > > > http://www.bmsc.washington.edu/people/merritt/gnuplot/ > > > > go down to: Histogramming Tabular Data > > > > On that histogram I would like to plot the y-values on the bars. > > > > > > I am using: > > > > 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 > > |
|
From: <rhu...@ih...> - 2010-09-28 05:05:14
|
This may help someone else.... $0 = column(0) is a pseudocolumn The sequential order of each point within a data set. The counter starts at 0 and is reset by two sequential blank records. The shorthand form $0 is available. Other pseudocolumns are column(-1) and column(-2) gnuplot> help pseudo On Mon, 27 Sep 2010 09:15:07 -0700 "rhu...@ih..." <rhu...@ih...> wrote: > Thanks this gets me much closer. > I don't feel so bad now. That isn't as simple as I had expected. > > Now I need to figure out how to add some additional logic to position the label > for those bars that are shorter than the number of chars in the label. I think I > can use a -/+ offset based on the bar size. > > I tried > > gnuplot> help $0 > > But didn't turn up anything and the mention of $0 in the doc > wasn't enough. Is the $0 in this case relative? > i.e. is it the position on the x-axis of the x-value from "using"? > > I thought $1 was the first column of the data file so $0 is still unclear to > me. > > One thing I found was that the Index in the 4.4 gnuplot.pdf is empty/blank. > Intentional? Or a bug? > > > On Mon, 27 Sep 2010 01:41:17 -0700 (PDT) > Thomas Sefzick <t.s...@fz...> wrote: > > > > extend the plot command a little bit: > > > > plot 'immigration.dat' using 6:xtic(1) title col, \ > > '' u 12 ti col, '' u 13 ti col, '' u 14 ti col, \ > > '' using (($0-1)-0.3):6:6 with labels left rotate by 90 offset graph > > 0,0.02 notitle, \ > > '' u (($0-1)-0.1):12:12 w labels left rot by 90 off gr 0,0.02 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 > > > > > > rhubbell wrote: > > > > > > > > > I just want to plot the underlying data for each bar on the bar itself. > > > Can someone show me how to do so using this page? > > > > > > http://www.bmsc.washington.edu/people/merritt/gnuplot/ > > > > > > go down to: Histogramming Tabular Data > > > > > > On that histogram I would like to plot the y-values on the bars. > > > > > > > > > I am using: > > > > > > 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 > > > > > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info -- |