|
From: Thomas S. <t.s...@fz...> - 2009-10-19 10:17:49
|
you mix xticlabels for histograms and x-axis timedata. this can not work. and, your column numbering is not correct. use following script and see if it does what you expect: reset set title "Database Connections" set key below set style data histogram set style histogram rowstacked set style fill solid noborder set boxwidth 0.75 plot 'latest-connections.dat' using 3:xtic(2) title "A", \ '' using 4 title "B", \ '' using 5 title "C", \ '' using 6 title "D", '' using ($7-($3+$4+$5+$6)) title "other" Steve Cohen wrote: > > All the samples tend to assume that you are working from a data file > where the header row contains the labels for each piece of the stack. > That is not the case in my situation. I want to supply the labels from > each stack in the script. > > My script is as follows: > > #set terminal png transparent nocrop enhanced size 900 600 > #set output 'latest-connections.png' > set title "Database Connections" > set key below > set xdata time > set timefmt "%Y-%m-%d %H:%M" > set format x "%H:%M" > set style data histogram > set style histogram rowstacked > set style fill solid noborder > > plot 'latest-connections.dat' using 1 "%Y-%m-%d %H:%M", \ > '' using 2 title "A", \ > '' using 3 title "B", \ > '' using 4 title "C", \ > '' using 5 title "D", \ > '' using ($6-($2+$3+$4+$5)) title "other" > ------------------------------------------ > > Data File is as follows: > > 2009-10-17 10:15 5 0 0 22 27 > 2009-10-17 10:17 5 0 0 8 13 > 2009-10-17 10:19 5 0 0 8 13 > 2009-10-17 10:31 5 0 0 13 18 > ... > > Error message is: > > "connections2.gplot", line 17: Please use between 1 and 7 conversions, > of type double (%lf) > > Not sure what this means or what I must do to correct it. > > Can someone help? > > Thanks. > > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Gnuplot-info mailing list > Gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > -- View this message in context: http://www.nabble.com/need-help-with-stacked-histogram-tp25949495p25955953.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |