|
From: Wilfried K. <wil...@gm...> - 2011-08-29 13:42:47
|
Thanks a lot ! It does exactly what I need. ----- Cordialement, Wilfried Kirschenmann "An expert is a person who has made all the mistakes that can be made in a very narrow field."* *Niels Bohr - *Danish physicist (1885 - 1962)* On Mon, Aug 29, 2011 at 14:14, Thomas Sefzick <t.s...@fz...>wrote: > Wilfried Kirschenmann <wilfried.kirschenmann <at> gmail.com> writes: > > > > > Hi ! > > > > Is there any way to make pivot charts with gnuplot ? > > While the rendering is not as perfect as with gnuplot (especially for > latex > > integration), this feature is quite cool for rendering complex data. > > The basic idea is to provide several lines for the xtics. > > Here is an example made with Excel 2010 : > > http://img33.imageshack.us/img33/2893/2dxtics.png > > > > I think such a result can be obtained using xtics (for hbw) and xmtics > (for > > BlockSize). But I don't really know how. > > Furthermore, I do not have any clue on how to have more than two lines > with > > such a solution. > > > > Does someone have any idea to do this with gnuplot ? > > > > Thank you ! > > > > Wilfried K. > > > > PS : here is an example data file corresponding to the above example. > > I can change the format if required. This is just to give an idea. > > > > hbw BlockSize 8 16 32 Colums > > 2 50 4,17198 4,16793 3,89913 3,02885 > > 2 100 4,21908 4,21775 3,78856 3,05236 > > 2 200 4,24002 4,23781 3,66784 2,98845 > > 2 500 4,25776 4,23258 3,57771 2,64875 > > 2 1000 4,25216 4,22121 3,52153 2,37671 > > 3 50 5,9882 5,99525 5,46246 4,35246 > > 3 100 6,10275 6,09506 5,34337 4,3587 > > 3 200 6,13502 6,12775 5,1196 4,18988 > > 3 500 6,15232 6,12088 5,01207 3,55759 > > 3 1000 6,17388 6,14961 4,90655 3,07677 > > 4 50 7,16163 7,13301 6,40267 5,21287 > > 4 100 7,32222 7,28905 6,24217 5,15652 > > 4 200 7,38001 7,331 5,97103 4,57647 > > 4 500 7,40991 7,34586 5,85352 3,73692 > > 4 1000 7,43365 7,41626 5,53288 3,32743 > > 5 50 7,9758 7,93465 7,11937 5,82013 > > 5 100 8,18808 8,13962 6,96093 5,70663 > > 5 200 8,27238 8,19436 6,71287 4,79545 > > 5 500 8,32901 8,22072 6,4675 3,94972 > > 5 1000 8,36299 8,31976 5,98776 3,44018 > > 10 50 9,67729 9,56415 8,06963 7,245 > > 10 100 10,1679 9,94364 7,81294 5,88062 > > 10 200 10,3915 10,0978 7,71242 5,06986 > > 10 500 10,5716 10,3915 7,14721 4,28776 > > 10 1000 10,6165 10,0499 6,08965 3,43618 > > 15 50 10,0526 9,85771 8,06831 7,32775 > > 15 100 10,8091 10,3627 8,20089 5,86304 > > 15 200 11,1541 10,6012 8,0179 5,06813 > > 15 500 11,3891 10,9835 7,37601 4,28262 > > 15 1000 11,4836 9,64651 3,51027 3,4761 > > 20 50 10,0225 9,7607 8,05886 6,88685 > > 20 100 10,9907 10,3261 8,37316 5,80576 > > 20 200 11,5556 10,6838 8,1059 4,96834 > > 20 500 11,8022 10,6901 7,48284 3,82774 > > 20 1000 11,8772 8,60491 2,72766 2,84542 > > PPS : > > In my real cases, each hbw may not have the same set of BlockSize values. > > > ------------------------------------------------------------------------------ > > EMC VNX: the world's simplest storage, starting under $10K > > The only unified storage solution that offers unified management > > Up to 160% more powerful than alternatives and 25% more efficient. > > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > > _______________________________________________ > > gnuplot-info mailing list > > gnuplot-info <at> lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > > > > > mxtics have no label, so you can't use them. > but you could use explicit xtics and labels: > > reset > set macros > > datafilename="ts.dat" > > set decimalsign locale "de_DE"; set decimalsign "." > > set bmargin 4 > # the following line works for gnuplot version >4.4 only > #set xtics scale 0,0 offset 0,0 rotate by 90 right > # this work for gnuplot version >=4.4 > set xtics scale 0,0 offset 0,0 rotate by -90 > set yrange [0:14] > set ytics 2 > set grid ytics > > # plot into table to set the xtics labels > set table > > xticlabels="set xtics (" > plot datafilename using ( \ > $0>0?xticlabels=xticlabels.",":0 , \ > xticlabels=xticlabels."\"".stringcolumn(2)."\" ".gprintf("%f",$0) , > \ > $0):3 > > xticlabels=xticlabels.")" > print xticlabels > @xticlabels > > # plot into table to set labels and arrows > > label1=";set label " > label2=",screen 0.001 center" > xlabels="" > arrow1=";set arrow " > arrow2=" from first " > arrow3=",0 to first " > arrow4=",screen 0 nohead" > xarrows="" > nl=0 > xv=NaN > xvs="" > xl=NaN > xr=NaN > > plot datafilename using ( \ > > xv!=$1?xarrows=xarrows.arrow1.sprintf("%d",nl+1).arrow2.gprintf("%f",$0-0.5).\ > arrow3.gprintf("%f",$0-0.5).arrow4:0 , \ > xv!=$1?xr=($0-1):0 , \ > xv!=$1?(nl>0?xlpos=0.5*(xr-xl)+xl:0):0 , \ > xv!=$1?(nl>0?xlabels=xlabels.label1.sprintf("%d",nl)." \"".xvs."\" at > first \ > ".gprintf("%f",xlpos).label2:0):0 , \ > xv!=$1?xvs=stringcolumn(1):0 , \ > xv!=$1?xl=$0:0 , \ > xv!=$1?nl=nl+1:0 , \ > xv!=$1?xv=$1:0 , \ > xtemp=$0 , \ > $0):3 > xlpos=0.5*(xtemp-xl)+xl > xlabels=xlabels.label1.sprintf("%d",nl+1)." \"".xvs."\" at first > ".gprintf("%f"\ > ,xlpos).label2 > print xlabels > @xlabels > > xarrows=xarrows.arrow1.sprintf("%d",nl+2).arrow2.gprintf("%f",xtemp+0.5).arrow3\ > .gprintf("%f",xtemp+0.5).arrow4 > print xarrows > @xarrows > > unset table > > # plot into dumb terminal (table doesn't work here) to set the xrange > set term push > set term dumb > plot datafilename using 0:3 with linespoints, \ > '' using 0:4 with linespoints, \ > '' using 0:5 with linespoints, \ > '' using 0:6 with linespoints > set term pop > > set xrange [GPVAL_X_MIN-0.5:GPVAL_X_MAX+0.5] > > replot > > > > > > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > |