|
From: canavanin <can...@ya...> - 2011-12-04 16:27:57
|
Hi everyone I need to create a graph showing pairs of value. One item from each pair is a single value, the other one is supposed to show a range of values (my idea was to plot the mean value with error bars to indicate the range's max and min, but I'm open to better ideas). The x-axis has no purpose other than giving the names of the various categories (just like in a histogram) - all that matters are the y-values. I am pretty sure I could create something like this (value pairs and x-categories) using histograms, but boxes just strike me as wrong in this case. Is there a way to create such a graph? If so, could you please point me in the right direction? Thanks a lot for your time! PS: I have already asked this question on stackoverflow, but I guess it's not really the right forum for gnuplot questions. There, however, I have also included a rough sketch of my desired graph, and some further details. The link is: http://stackoverflow.com/q/8371993/475845 http://stackoverflow.com/q/8371993/475845 Thanks again! -- View this message in context: http://old.nabble.com/Create-non-bar-chart-with-categories-on-x-axis-tp32912852p32912852.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: walter h. <wh...@bf...> - 2011-12-04 20:15:22
|
hi, Maybe boxerror is what you are looking for ? here is a small demo. re wh set xrange [-1:5] set yrange [0:10] set boxwidth 1 plot "-" u 0:1:2 with boxerror 5 0.5 7 0.5 5 0.7 e Am 04.12.2011 17:27, schrieb canavanin: > > Hi everyone > > I need to create a graph showing pairs of value. One item from each pair is > a single value, the other one is supposed to show a range of values (my idea > was to plot the mean value with error bars to indicate the range's max and > min, but I'm open to better ideas). The x-axis has no purpose other than > giving the names of the various categories (just like in a histogram) - all > that matters are the y-values. > > I am pretty sure I could create something like this (value pairs and > x-categories) using histograms, but boxes just strike me as wrong in this > case. > > Is there a way to create such a graph? If so, could you please point me in > the right direction? > |
|
From: D K <can...@ya...> - 2011-12-04 21:26:18
|
Dear Walter Thank you very much for your quick reply. The trouble is that I would prefer not to use boxes at all, certainly not for the single values I have to plot. I think the plot would be much clearer if I used points (and maybe error bars or lines) only. Thanks again! Donata On 12/04/2011 09:15 PM, walter harms wrote: > hi, > Maybe boxerror is what you are looking for ? > here is a small demo. > > re > wh > > set xrange [-1:5] > set yrange [0:10] > set boxwidth 1 > plot "-" u 0:1:2 with boxerror > 5 0.5 > 7 0.5 > 5 0.7 > e > > Am 04.12.2011 17:27, schrieb canavanin: >> Hi everyone >> >> I need to create a graph showing pairs of value. One item from each pair is >> a single value, the other one is supposed to show a range of values (my idea >> was to plot the mean value with error bars to indicate the range's max and >> min, but I'm open to better ideas). The x-axis has no purpose other than >> giving the names of the various categories (just like in a histogram) - all >> that matters are the y-values. >> >> I am pretty sure I could create something like this (value pairs and >> x-categories) using histograms, but boxes just strike me as wrong in this >> case. >> >> Is there a way to create such a graph? If so, could you please point me in >> the right direction? >> |
|
From: Thomas S. <t.s...@fz...> - 2011-12-05 07:59:40
|
canavanin <canavanin <at> yahoo.se> writes: > Hi everyone > > I need to create a graph showing pairs of value. One item from each pair is > a single value, the other one is supposed to show a range of values (my idea > was to plot the mean value with error bars to indicate the range's max and > min, but I'm open to better ideas). The x-axis has no purpose other than > giving the names of the various categories (just like in a histogram) - all > that matters are the y-values. > > I am pretty sure I could create something like this (value pairs and > x-categories) using histograms, but boxes just strike me as wrong in this > case. > > Is there a way to create such a graph? If so, could you please point me in > the right direction? > > Thanks a lot for your time! > > PS: I have already asked this question on stackoverflow, but I guess it's > not really the right forum for gnuplot questions. There, however, I have > also included a rough sketch of my desired graph, and some further details. > The link is: http://stackoverflow.com/q/8371993/475845 > http://stackoverflow.com/q/8371993/475845 Thanks again! you need to plot something out of (y-)range to get the xtics labels at the right positions. then you plot a large black point shifted to the left and on top a slightly smaller colored point. the same applies to the points which a shifted to the right plus errorbars with point size '0'. reset set xrange [-1:3] set yrange [0:25] unset bars xoffset=0.2 plot "ts.dat" using 0:(-999):xticlabel(1) every 2 notitle, \ "" using ($0-xoffset):2 every 2 \ with points pointtype 7 pointsize 9 linecolor rgb 'black' notitle, \ "" using ($0-xoffset):2 every 2 \ with points pointtype 7 pointsize 8 linecolor rgb 'red' notitle, \ "" using ($0+xoffset):2 every 2::1 \ with points pointtype 7 pointsize 9 linecolor rgb 'black' notitle, \ "" using ($0+xoffset):2 every 2::1 \ with points pointtype 7 pointsize 8 linecolor rgb 'blue' notitle, \ "" using ($0+xoffset):2:3 every 2::1 \ with errorbars pointsize 0 linecolor rgb 'black' notitle |