You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(2) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(3) |
Feb
(1) |
Mar
(2) |
Apr
(22) |
May
(52) |
Jun
(43) |
Jul
(36) |
Aug
(59) |
Sep
(37) |
Oct
(55) |
Nov
(39) |
Dec
(36) |
| 2005 |
Jan
(64) |
Feb
(40) |
Mar
(62) |
Apr
(58) |
May
(256) |
Jun
(77) |
Jul
(80) |
Aug
(39) |
Sep
(56) |
Oct
(36) |
Nov
(113) |
Dec
(68) |
| 2006 |
Jan
(43) |
Feb
(64) |
Mar
(69) |
Apr
(60) |
May
(71) |
Jun
(53) |
Jul
(63) |
Aug
(63) |
Sep
(76) |
Oct
(85) |
Nov
(82) |
Dec
(73) |
| 2007 |
Jan
(75) |
Feb
(82) |
Mar
(84) |
Apr
(104) |
May
(67) |
Jun
(101) |
Jul
(107) |
Aug
(138) |
Sep
(128) |
Oct
(106) |
Nov
(112) |
Dec
(112) |
| 2008 |
Jan
(94) |
Feb
(87) |
Mar
(146) |
Apr
(169) |
May
(75) |
Jun
(26) |
Jul
(26) |
Aug
(7) |
Sep
(18) |
Oct
(53) |
Nov
(42) |
Dec
(19) |
| 2009 |
Jan
(43) |
Feb
(39) |
Mar
(18) |
Apr
(45) |
May
(66) |
Jun
(87) |
Jul
(56) |
Aug
(41) |
Sep
(56) |
Oct
(139) |
Nov
(98) |
Dec
(88) |
| 2010 |
Jan
(81) |
Feb
(79) |
Mar
(83) |
Apr
(97) |
May
(124) |
Jun
(84) |
Jul
(53) |
Aug
(85) |
Sep
(89) |
Oct
(50) |
Nov
(98) |
Dec
(78) |
| 2011 |
Jan
(97) |
Feb
(74) |
Mar
(68) |
Apr
(54) |
May
(63) |
Jun
(59) |
Jul
(65) |
Aug
(58) |
Sep
(37) |
Oct
(40) |
Nov
(59) |
Dec
(35) |
| 2012 |
Jan
(16) |
Feb
(56) |
Mar
(63) |
Apr
(25) |
May
(48) |
Jun
(58) |
Jul
(20) |
Aug
(13) |
Sep
(43) |
Oct
(35) |
Nov
(20) |
Dec
(17) |
| 2013 |
Jan
(22) |
Feb
(11) |
Mar
(51) |
Apr
(34) |
May
(57) |
Jun
(27) |
Jul
(70) |
Aug
(30) |
Sep
(38) |
Oct
(53) |
Nov
(40) |
Dec
(25) |
| 2014 |
Jan
(26) |
Feb
(35) |
Mar
(60) |
Apr
(12) |
May
(17) |
Jun
(15) |
Jul
(9) |
Aug
(18) |
Sep
(46) |
Oct
(18) |
Nov
(19) |
Dec
(15) |
| 2015 |
Jan
(17) |
Feb
(28) |
Mar
(21) |
Apr
(54) |
May
(36) |
Jun
(8) |
Jul
(30) |
Aug
(13) |
Sep
(3) |
Oct
(28) |
Nov
(3) |
Dec
(3) |
| 2016 |
Jan
(11) |
Feb
(9) |
Mar
(29) |
Apr
(10) |
May
(8) |
Jun
(5) |
Jul
(50) |
Aug
(57) |
Sep
(13) |
Oct
(5) |
Nov
(17) |
Dec
(11) |
| 2017 |
Jan
(3) |
Feb
(23) |
Mar
(16) |
Apr
(7) |
May
(15) |
Jun
(12) |
Jul
(48) |
Aug
(15) |
Sep
(3) |
Oct
(20) |
Nov
(28) |
Dec
(21) |
| 2018 |
Jan
(13) |
Feb
(21) |
Mar
(21) |
Apr
(7) |
May
(3) |
Jun
(7) |
Jul
(27) |
Aug
(38) |
Sep
(4) |
Oct
(30) |
Nov
(22) |
Dec
|
| 2019 |
Jan
(5) |
Feb
(16) |
Mar
(1) |
Apr
(9) |
May
(7) |
Jun
(20) |
Jul
(13) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(2) |
Dec
(4) |
| 2020 |
Jan
(6) |
Feb
(11) |
Mar
(1) |
Apr
(18) |
May
(4) |
Jun
(5) |
Jul
(12) |
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
(1) |
Dec
(17) |
| 2021 |
Jan
(1) |
Feb
(11) |
Mar
(16) |
Apr
(6) |
May
(5) |
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
(8) |
Oct
(10) |
Nov
(4) |
Dec
(4) |
| 2022 |
Jan
(9) |
Feb
(35) |
Mar
(4) |
Apr
|
May
(3) |
Jun
(49) |
Jul
(11) |
Aug
|
Sep
(5) |
Oct
(2) |
Nov
(16) |
Dec
(13) |
| 2023 |
Jan
|
Feb
(8) |
Mar
(3) |
Apr
|
May
(8) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
| 2024 |
Jan
(6) |
Feb
(9) |
Mar
|
Apr
(26) |
May
(24) |
Jun
|
Jul
(4) |
Aug
(2) |
Sep
(1) |
Oct
(10) |
Nov
(9) |
Dec
|
| 2025 |
Jan
|
Feb
(22) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(4) |
| 2026 |
Jan
|
Feb
(24) |
Mar
(20) |
Apr
(18) |
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Thomas S. <t.s...@fz...> - 2011-09-05 09:23:21
|
'maxrows' is not really needed, it produces two columns of keys. if you need this, upgrade to gnuplot 4.4 'notitle' suppresses the key for the specific plot. '0/0' means 'undefined' (you could also use 'NaN') and results in a plot which is empty but has a key which you may change via the 'title' option. alpinito1 wrote: > > Hello and thank you for your reply. > > I tried what you proposed but I get a message: > > undefined variable: maxrows > > I use gnuplot 4.2 patchlevel 4. > > Otherwise, I tried to plot the empty plots, but I dont know why any key > appears... > > Thank you in adavance > > Best regards, > > Daniel > > > Thomas Sefzick wrote: >> >> plot the 12 curves with option "notitle" and add 4 plus 3 empty plots >> with titles: >> >> set key maxrows 4 >> plot ... , 0/0 linetype 1 linecolor 1 title "method 1", 0/0 lt 1 lc 2 >> title "method 2", ... >> >> >> alpinito1 wrote: >>> >>> Hello, >>> >>> I have a set of curves, imagine I have 4 methods and for each method I >>> have 3 test case. >>> >>> What I want is to plot the 12 curves (4*3) in the same figure, using 4 >>> different colors (one for each method), and 3 different line type (one >>> for each test case). I want to have two keys (legends) one for the >>> colors and one for the line type. >>> >>> I hope you understand my question, >>> >>> Thank you in advance. >>> >>> Best regards, >>> >>> Daniel >>> >> >> > > -- View this message in context: http://old.nabble.com/How-to-create-two-keys-%28legends%29-in-the-same-plot-tp32385323p32399649.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Thomas S. <t.s...@fz...> - 2011-09-03 17:13:31
|
plot the 12 curves with option "notitle" and add 4 plus 3 empty plots with titles: set key maxrows 4 plot ... , 0/0 linetype 1 linecolor 1 title "method 1", 0/0 lt 1 lc 2 title "method 2", ... alpinito1 wrote: > > Hello, > > I have a set of curves, imagine I have 4 methods and for each method I > have 3 test case. > > What I want is to plot the 12 curves (4*3) in the same figure, using 4 > different colors (one for each method), and 3 different line type (one for > each test case). I want to have two keys (legends) one for the colors and > one for the line type. > > I hope you understand my question, > > Thank you in advance. > > Best regards, > > Daniel > -- View this message in context: http://old.nabble.com/How-to-create-two-keys-%28legends%29-in-the-same-plot-tp32385323p32392863.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Wilfried K. <wil...@gm...> - 2011-09-01 08:30:45
|
Hi
I plot several curves :
plot XXX title A, XXX title B, XXX title C, title D, title E, title F
If I have set the key such as :
set key Left reverse above horizontal
I will get :
+-+-+ A +-+-+ D
+-+-+ B +-+-+ E
+-+-+ C +-+-+ F
++++-+-++-+-+-+-+-+-++-+-+-+-+-+-++-+-+
| |
Graph
However, If I set the key with the invert keyword :
set key Left reverse above invert horizontal
I will get :
+-+-+ C +-+-+ F
+-+-+ B +-+-+ E
+-+-+ A +-+-+ D
++++-+-++-+-+-+-+-+-++-+-+-+-+-+-++-+-+
| |
Graph
Which is not what I wanted.
How can I completely invert le key list in the legend ?
What I would like to have is :
+-+-+ F +-+-+ C
+-+-+ E +-+-+ B
+-+-+ E +-+-+ A
++++-+-++-+-+-+-+-+-++-+-+-+-+-+-++-+-+
| |
Graph
Thank you by advance !
-----
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)
|
|
From: Robbie M. <ro...@ac...> - 2011-08-31 08:14:21
|
Hi Mathias I find the persist options really useful. So hopefully the persist bug on Windows systems can be fixed. Robbie ------------------------------------------------------------ To: "Robbie Morrison" <ro...@ac...> Subject: Re: [Gnuplot-info] call gnuplot from c++ (windows) Message-ID: <201...@ju...> From: Mathias Anselmann <mat...@li...> Date: Tue, 30 Aug 2011 20:38:59 +0200 ------------------------------------------------------------ > Hi Robbie, > > thanks for your reply, I have opened a bug report > yesterday, you can find it here > > http://sourceforge.net/tracker/?func=detail&aid=3400429&group_id=2055&atid=102055 > > so maybe one of the developers will have a look at it. > > Cheers, > Mathias > > On Tue, 30 Aug 2011 10:43:08 +1200 (NZST) > "Robbie Morrison" <ro...@ac...> wrote: >> >> Hello Mathias >> >> I just searched my commit log for clues about using >> persist as an option in my 'Gnuplot' class, but nothing >> concrete came up. So I can't really add anything >> sensible to this particular line of discussion. Sorry. >> >> For the record, my gnuplot version is 4.4 patchlevel 3 >> and was built from source on 23-May-2011 using the then >> stable version at that time. My operating system is an >> aging Ubuntu 10.04 LTS, currently with the Linux >> 2.6.32-33-generic kernel. >> >> Robbie --- Robbie Morrison PhD student -- policy-oriented energy system simulation Technical University of Berlin (TU-Berlin), Germany University email (redirected) : mor...@ie... Webmail (preferred) : ro...@ac... [from Webmail client] |
|
From: Mathias A. <mat...@li...> - 2011-08-30 18:40:20
|
Hi Robbie, thanks for your reply, I have opened a bug report yesterday, you can find it here http://sourceforge.net/tracker/?func=detail&aid=3400429&group_id=2055&atid=102055 so maybe one of the developers will have a look at it. Cheers, Mathias On Tue, 30 Aug 2011 10:43:08 +1200 (NZST) "Robbie Morrison" <ro...@ac...> wrote: > > Hello Mathias > > I just searched my commit log for clues about using > persist as an option in my 'Gnuplot' class, but nothing > concrete came up. So I can't really add anything > sensible to this particular line of discussion. Sorry. > > For the record, my gnuplot version is 4.4 patchlevel 3 > and was built from source on 23-May-2011 using the then > stable version at that time. My operating system is an > aging Ubuntu 10.04 LTS, currently with the Linux > 2.6.32-33-generic kernel. > > Robbie |
|
From: Robbie M. <ro...@ac...> - 2011-08-29 22:43:34
|
Hello Mathias I just searched my commit log for clues about using persist as an option in my 'Gnuplot' class, but nothing concrete came up. So I can't really add anything sensible to this particular line of discussion. Sorry. For the record, my gnuplot version is 4.4 patchlevel 3 and was built from source on 23-May-2011 using the then stable version at that time. My operating system is an aging Ubuntu 10.04 LTS, currently with the Linux 2.6.32-33-generic kernel. Robbie ------------------------------------------------------------ To: Robbie Morrison <ro...@ac...> Subject: Re: [Gnuplot-info] call gnuplot from c++ (windows) Message-ID: <CAH...@ma...> From: Mathias Anselmann <mat...@li...> Date: Mon, 29 Aug 2011 21:45:30 +0200 ------------------------------------------------------------ > Hello again, > > so I now managed to test your proposals and for me it > looks like a bug in the "--persist" option of > "gnuplot.exe" on windows (xp). Even if I start > gnuplot.exe from a command window with the "--persist" > switch, plot something and "exit" gnuplot, the plot > window closes. The same thing happens when I set > manually "set terminal wxt persist" in a gnuplot > session and "exit" gnuplot afterwards. It just ignores > this option. On linux it works fine (same version of > gnuplot - gnuplot 4.4 patchlevel 3). I also tried > gnuplot 4.5 (dev snapshot) on windows and gnuplot 4.4 > patchlevel 0 on windows - same result. > > This switch is just useless. Can anybody confirm this? > > Greetings > Mathias --- Robbie Morrison PhD student -- policy-oriented energy system simulation Technical University of Berlin (TU-Berlin), Germany University email (redirected) : mor...@ie... Webmail (preferred) : ro...@ac... [from Webmail client] |
|
From: Mathias A. <mat...@li...> - 2011-08-29 19:45:36
|
Hello again, so I now managed to test your proposals and for me it looks like a bug in the "--persist" option of "gnuplot.exe" on windows (xp). Even if I start gnuplot.exe from a command window with the "--persist" switch, plot something and "exit" gnuplot, the plot window closes. The same thing happens when I set manually "set terminal wxt persist" in a gnuplot session and "exit" gnuplot afterwards. It just ignores this option. On linux it works fine (same version of gnuplot - gnuplot 4.4 patchlevel 3). I also tried gnuplot 4.5 (dev snapshot) on windows and gnuplot 4.4 patchlevel 0 on windows - same result. This switch is just useless. Can anybody confirm this? Greetings Mathias |
|
From: Tait <gnu...@t4...> - 2011-08-29 14:36:32
|
> Cycle plots are useful in my work, and I'd like to know if it possible to > create cycle plots in gnuplot. > > Naomi Robbins discusses cycle plots in her book ... > as well as in this article: > http://www.perceptualedge.com/articles/guests/intro_to_cycle_plots.pdf As far as gnuplot is concerned, this is just a data plot, like any other. I made a quick example: http://www.plotshare.com/index.ws/plot/524664706. It uses linespoints for the line parts, and candlesticks to draw in the median line. On a stylistic note, I would not use a cycle plot. A graph should clearly and intuitively convey its message to the audience in the simplest way possible. I've yet to see a cycle plot that didn't complicate and obscure the message, when a simpler approach would have worked better. The article's claims notwithstanding, a cycle plot has the same weaknesses as the plots it purports to replace. By grouping the x-axis according to weekday, informtaion on trend through the week is difficult to read. (Try telling what happened in week three, for example: you must count one, two, three points from the left side of each grouping.) If the cycle plot had instead grouped by week (sub-grouping by day), the reader would have the opposite problem (what happened on Wednesdays?). Just put the independent variable on the x-axis, and the dependent on the y. If you have two points to make, then do it with two graphs. Don't try to squish both points awkwardly into one graph that makes neither point clearly. I'll illustrate using the example from your linked article. If the intent is to show trends by day for each week: put weeks 1-8 on a common x-axis, put the units sold for a given day on the y-axis, and stack the graphs for each day one on top of another. I just pulled this together quickly; it would need y-tics and some adjustment, but it might look like http://www.plotshare.com/index.ws/plot/785484084. If the intent is to convey relative mean and variance from day to day, then a box plot should be used to show average, variance, and outliers for each day, like http://www.plotshare.com/index.ws/plot/292462185. If the purpose was to compare week one to week four, then repeat the box plot using week number as the independent axis. Trying to do all at once pulls the audience's attention in multiple directions. |
|
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 > |
|
From: Thomas S. <t.s...@fz...> - 2011-08-29 12:14:44
|
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 |
|
From: DavidH56 <dlh...@co...> - 2011-08-28 22:43:16
|
Cycle plots are useful in my work, and I'd like to know if it possible to create cycle plots in gnuplot. Naomi Robbins discusses cycle plots in her book Creating More Effective Graphs as well as in this article: http://www.perceptualedge.com/articles/guests/intro_to_cycle_plots.pdf Cycle plots can be generated in R using the "monthplot" command. If cycle plots can't be created in gnuplot, is there a way to make a feature request? Thanks, David -- View this message in context: http://old.nabble.com/Can-gnuplot-create-cycle-plots-%28also-called-month-plots%29--tp32276901p32276901.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: DavidH56 <dlh...@co...> - 2011-08-28 22:43:05
|
Thomas, Thank you, your code worked great, it's exactly what I needed. I've been struggling with this problem for a while. I changed the timefmt in my script to "%m-%d-%Y" to match my data and I used set nokey to turn off the legend. The only minor problem I have is with the x axis. The x axis values run from 0 to 80 in increments of 10 units. The first plot, which is all of the January values, is flush left with an x value of zero, and the x values get out of kilter with December falling at approximately 70. Any thoughts? Thanks again, David Thomas Sefzick wrote: > > assuming that your data have the following format > > ... > 2014-01-01 169 > 2014-02-01 170 > 2014-03-01 171 > 2014-04-01 172 > ... > > and that there are no gaps in the data and that there is one value > per month in every year, the following script may serve as an example > how such a cycle plot may be produced: > > reset > > # number of entries per month (i.e. number of years) > n=0 > # number of months > m=12 > > # although x-data are dates, we do the conversion into > # 'seconds since the beginning of the epoch' by our own, > # so we *don't* set xdata > #set xdata time > # but 'timefmt' we need for using 'timecolumn()' > set timefmt "%Y-%m-%d" > > # dummy plot to determine the value of 'n' > set table > plot for [i=0:m-1] "datafilename" \ > using ($0>n?n=$0:0 , $0):2 every 12::i > unset table > print n > > plot for [i=0:m-1] "datafilename" \ > using (tm_mon(timecolumn(1))+$0+i*n):2 \ > every m::i \ > with linespoints > > > > DavidH56 wrote: >> >> Cycle plots are useful in my work, and I'd like to know if it possible to >> create cycle plots in gnuplot. >> >> Naomi Robbins discusses cycle plots in her book Creating More Effective >> Graphs as well as in this article: >> >> http://www.perceptualedge.com/articles/guests/intro_to_cycle_plots.pdf >> >> Cycle plots can be generated in R using the "monthplot" command. If cycle >> plots can't be created in gnuplot, is there a way to make a feature >> request? >> >> Thanks, >> >> David >> >> > > -- View this message in context: http://old.nabble.com/Can-gnuplot-create-cycle-plots-%28also-called-month-plots%29--tp32276901p32323781.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Wilfried K. <wil...@gm...> - 2011-08-28 22:40:20
|
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. |
|
From: Wilfried K. <wil...@gm...> - 2011-08-28 16:59:15
|
Hi ! I recently discovered pivot charts in Excel. 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 this with gnuplot ? Thank you ! Wilfried K. PS : here is an example data file corresponding to the above example : 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 |
|
From: Robbie M. <ro...@ac...> - 2011-08-26 14:28:46
|
------------------------------------------------------------
To: Benjamin von Ardenne <ben...@gm...>
Subject: Re: [Gnuplot-info] call gnuplot from c++ (windows)
Message-ID: <201...@ju...>
From: Mathias Anselmann <mat...@li...>
Date: Fri, 26 Aug 2011 12:36:26 +0200
------------------------------------------------------------
Hello Mathias
> So has anybody got a clue for me here?
Here is an extract of the code I use, based on code by
Daniel Stahlke. My platform is GCC + Linux and not Windows.
I remember having to experiment quite a lot to get
the run-time behaviors I want. I also use the "dumb"
during unit testing so that I don't create plot windows.
Note that I set PERSIST as a gnuplot statement and NOT
as a command-line option. Maybe that will work for you?
I'm happy to forward all my code for this unit, if that
would help. GPLv3 + the MIT license from Daniel.
good luck, Robbie
//// HEADER
#include <boost/iostreams/stream.hpp> // stream template
for io
#include <boost/iostreams/device/file_descriptor.hpp> // filesystem access
class Gnuplot :
public boost::iostreams::stream<boost::iostreams::file_descriptor_sink>
{
public:
explicit
Gnuplot
(const std::string cmd);
~Gnuplot();
// BEHAVIOR SET FUNCTIONS
void setTerminal(const std::string& term); // "dumb" "x11" "wxt"
void setPersist(); // plot window remains
// DATA
private:
FILE* pout; // C-style stdlib io
std::string gnuplotTerm; // Gnuplot terminal device
}; // class 'Gnuplot'
//// IMPLEMENTATION
void
Gnuplot::setTerminal(const std::string& term) // "dumb" "x11" "wxt"
{
const bool supported = ( term == "dumb" ||
term == "x11" ||
term == "wxt" );
if ( supported ) logme("term = '" + term + "'");
else logme("WARNING: gnuplot terminal type not tested: " +
term);
gnuplotTerm = term; // store value
*this << "set terminal " << gnuplotTerm << std::endl;
}
void
Gnuplot::setPersist() // plot window remains open
{
*this << "set terminal " << gnuplotTerm << " persist" << std::endl;
}
//// USAGE
Gnuplot gp("gnuplot"); // gnuplot invocation string
gp.setTerminal("wxt");
gp.setPersist(); // sets persist
gp << "set xrange [-2:2]" << "\n";
...
---
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Technical University of Berlin (TU-Berlin), Germany
University email (redirected) : mor...@ie...
Webmail (preferred) : ro...@ac...
[from Webmail client]
|
|
From: Benjamin v. A. <ben...@gm...> - 2011-08-26 12:16:03
|
If you can live with a dos windows popping up and not using puts oder write
to execute the script but "-e script..." instead, try:
os.execute("start gnuplot -p -e \"plot sin(x)\" > NULL 2>&1")
It will open a separate window with the plot, and even if you close your
app, the window will still be opend. If you want to pipe data into the
process, you need to find another way (windows processes and stuff...)
Maybe that will fix your problem.
PS: Under linux, use gnuplot& instead of start gnuplot .
On Fri, Aug 26, 2011 at 12:36 PM, Mathias Anselmann <
mat...@li...> wrote:
> Hello Ben,
> your hint was really valuable, I'm again a step further now, so I guess
> this is the c syntax that I need:
>
> FILE *pipe = _popen("gnuplot --persist > NULL 2>&1","w");
>
> with this option the output of gnuplot is not displayed on my standard
> output. Unfortunately "--persist" seems to be usesless (also tried "-p") on
> windows, as the plot window closes after the program closes - and that's
> what I don't want. A really weird problem, I didn't think that this story
> can be that tough, in fact I have chosen gnuplot for easy cross-platform
> plotting...
>
> So has anybody got a clue for me here?
> Cheers,
> Mathias
>
> On Fri, 26 Aug 2011 11:19:08 +0200
> Benjamin von Ardenne <ben...@gm...> wrote:
>
> > Hey Mathias,
> >
> > here is some code I use in lua to open gnuplot as a pipe:
> >
> >
> > local gnu = io.popen(string.format("gnuplot -e \"load 'histogram.plt'\"
> > 2>&1") ,"r")
> > local res = gnu:read("*a")
> > gnu:close()
> >
> > Altough it is a little bit differt to yours, try adding the "2>&1" to
> your
> > command. It should reroute the standard output to the stderr stream. As
> you
> > can see, you can still get the gnuplot output by reading from the stream.
> >
> > I hope that will help you.
> >
> > Cheers,
> > Ben
>
|
|
From: Mathias A. <mat...@li...> - 2011-08-26 10:37:42
|
Hello Ben,
your hint was really valuable, I'm again a step further now, so I guess this is the c syntax that I need:
FILE *pipe = _popen("gnuplot --persist > NULL 2>&1","w");
with this option the output of gnuplot is not displayed on my standard output. Unfortunately "--persist" seems to be usesless (also tried "-p") on windows, as the plot window closes after the program closes - and that's what I don't want. A really weird problem, I didn't think that this story can be that tough, in fact I have chosen gnuplot for easy cross-platform plotting...
So has anybody got a clue for me here?
Cheers,
Mathias
On Fri, 26 Aug 2011 11:19:08 +0200
Benjamin von Ardenne <ben...@gm...> wrote:
> Hey Mathias,
>
> here is some code I use in lua to open gnuplot as a pipe:
>
>
> local gnu = io.popen(string.format("gnuplot -e \"load 'histogram.plt'\"
> 2>&1") ,"r")
> local res = gnu:read("*a")
> gnu:close()
>
> Altough it is a little bit differt to yours, try adding the "2>&1" to your
> command. It should reroute the standard output to the stderr stream. As you
> can see, you can still get the gnuplot output by reading from the stream.
>
> I hope that will help you.
>
> Cheers,
> Ben
|
|
From: Thomas S. <t.s...@fz...> - 2011-08-26 10:08:07
|
for version 4.4 of gnuplot replace the two block containing the 'do'
commands:
...
set table
# number of entries per month (i.e. number of years)
n=0
# dummy plot to determine the value of 'n'
plot for [i=0:m-1] "datafilename" \
using ($0>n?n=$0:0 , $0):2 every m::i
print n
# calculate the averages of y-values belonging together and
# generate the horizontal lines
temp=""
plot for [i=0:m-1] "datafilename" \
using ( \
$0==0?sum=$2:sum=sum+$2 , \
$0==(n-1)?av=sum/n:0 , \
$0==(n-1)?x=i*(n+1):0 , \
$0==(n-1)?temp=temp.";set arrow ".sprintf("%d",i+1)." from
".sprintf("%d",x).",".sprintf("%d",av)." to
".sprintf("%d",x+n).",".sprintf("%d",av)." nohead lt 1 lc rgb 'black'":0 , \
$0 \
):2 every m::i
@temp
# generate the xtics
mn="JanFebMarAprMayJunJulAugSepOctNovDec"
temp="set xtics ("
plot for [i=0:m-1] "datafilename" \
using ( \
i>0?temp=temp.",":0 , \
temp=temp.sprintf("\"%s\" %d",substr(mn,3*i+1,3*i+3),n/2+i*(n+1)) , \
$0 \
):2 every 1::0::0
temp=temp.")"
@temp
unset table
# and now the final plot
...
DavidH56 wrote:
>
> Hi Thomas,
>
> I'm getting this msg with the latest script:
>
> gnuplot> do for [i=0:m-1] {
>
> ^
>
> "cycle4a.txt", line 15: invalid complex constant
>
> Here's the script I'm using; my file is "Generation Data.txt" and I want
> to plot column 17. I made minor changes to the lines preceded with "*" (I
> removed comments for brevity):
>
> reset
> set macros
>
> m=12
>
> * set timefmt "%m-%d-%Y"
>
> set table
>
> n=0
> * plot for [i=0:m-1] "Generation Data.txt" \
> * using ($0>n?n=$0:0 , $0):17 every m::i
> print n
>
> do for [i=0:m-1] {
> sum=0
> * plot "Generation Data.txt" using 0:(sum=sum+$2 , $2) every m::i
> av=sum/n
> x=i*(n+1)
> set arrow i+1 from x,av to x+n,av nohead lt 1 lc rgb "black"
> }
>
> unset table
>
> mn="JanFebMarAprMayJunJulAugSepOctNovDec"
> temp="set xtics ("
> do for [i=0:m-1] {
> if (i>0) {temp=temp.","}
> temp=temp.sprintf("\"%s\" %d",substr(mn,3*i+1,3*i+3),n/2+i*(n+1))
> }
> temp=temp.")"
> @temp
>
> # and now the final plot
> *plot for [i=0:m-1] "Generation Data.txt" \
> * using (tm_mon(timecolumn(1))+$0+i*n):17 \
> every m::i \
> with linespoints \
> lt 7 lc rgb "black"
>
>
>
--
View this message in context: http://old.nabble.com/Can-gnuplot-create-cycle-plots-%28also-called-month-plots%29--tp32276901p32340682.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: Thomas S. <t.s...@fz...> - 2011-08-26 09:35:09
|
sorry, i didn't mention that the script works with the
development version of gnuplot only.
curly braces don't work for the actual version of gnuplot.
DavidH56 wrote:
>
> Hi Thomas,
>
> I'm getting this msg with the latest script:
>
> gnuplot> do for [i=0:m-1] {
>
> ^
>
> "cycle4a.txt", line 15: invalid complex constant
>
> Here's the script I'm using; my file is "Generation Data.txt" and I want
> to plot column 17. I made minor changes to the lines preceded with "*" (I
> removed comments for brevity):
>
> reset
> set macros
>
> m=12
>
> * set timefmt "%m-%d-%Y"
>
> set table
>
> n=0
> * plot for [i=0:m-1] "Generation Data.txt" \
> * using ($0>n?n=$0:0 , $0):17 every m::i
> print n
>
> do for [i=0:m-1] {
> sum=0
> * plot "Generation Data.txt" using 0:(sum=sum+$2 , $2) every m::i
> av=sum/n
> x=i*(n+1)
> set arrow i+1 from x,av to x+n,av nohead lt 1 lc rgb "black"
> }
>
> unset table
>
> mn="JanFebMarAprMayJunJulAugSepOctNovDec"
> temp="set xtics ("
> do for [i=0:m-1] {
> if (i>0) {temp=temp.","}
> temp=temp.sprintf("\"%s\" %d",substr(mn,3*i+1,3*i+3),n/2+i*(n+1))
> }
> temp=temp.")"
> @temp
>
> # and now the final plot
> *plot for [i=0:m-1] "Generation Data.txt" \
> * using (tm_mon(timecolumn(1))+$0+i*n):17 \
> every m::i \
> with linespoints \
> lt 7 lc rgb "black"
>
>
>
--
View this message in context: http://old.nabble.com/Can-gnuplot-create-cycle-plots-%28also-called-month-plots%29--tp32276901p32340517.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: Benjamin v. A. <ben...@gm...> - 2011-08-26 09:19:14
|
Hey Mathias,
here is some code I use in lua to open gnuplot as a pipe:
local gnu = io.popen(string.format("gnuplot -e \"load 'histogram.plt'\"
2>&1") ,"r")
local res = gnu:read("*a")
gnu:close()
Altough it is a little bit differt to yours, try adding the "2>&1" to your
command. It should reroute the standard output to the stderr stream. As you
can see, you can still get the gnuplot output by reading from the stream.
I hope that will help you.
Cheers,
Ben
On Wed, Aug 24, 2011 at 10:45 PM, Mathias Anselmann <
mat...@li...> wrote:
> Hello,
> I have a problem with a program that runs just fine under linux but has
> some issues when compiling it with mingw under windows. Here is an exctract
> of the part which does not work as expected:
>
> //create pipe for accessing gnuplot
> FILE *pipe = popen("pgnuplot -persist","w");
>
> //adjust settings
> fprintf(pipe, "set palette gray negative\n");
>
> //plot
> fprintf(pipe, "plot 'fileX.txt' matrix with image\n");
> fflush(pipe);
>
> //close gnuplot pipe
> pclose(pipe);
>
> Under Linux I have the same code, except that I use "gnuplot" there instead
> of "pgnuplot". If I run this program under Windows I get two situations:
>
> a) I get the error:
>
> Timeout: gnuplot is not ready
>
> Then the "graphical" gnuplot main window (haven't seen this on Linux)
> opens, shows just "gnuplot>" an that's it.
>
> b) Sometimes it shows no error and the main window opens and I see that the
> commands which I want to execute via c++ are calles and I see the plot.
>
> Does anybody know a solution for this problem? (The best case woult be if I
> would just see the "plot window" like under linux, I don't want to see the
> "main window" (you get it if you call wgnuplot.exe under windows).
> Cheers,
> Mathias
>
>
> ------------------------------------------------------------------------------
> 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
>
|
|
From: DavidH56 <dlh...@co...> - 2011-08-26 04:07:55
|
Hi Thomas,
I'm getting this msg with the latest script:
gnuplot> do for [i=0:m-1] {
^
"cycle4a.txt", line 15: invalid complex constant
Here's the script I'm using; my file is "Generation Data.txt" and I want to
plot column 17. I made minor changes to the lines preceded with "*" (I
removed comments for brevity):
reset
set macros
m=12
* set timefmt "%m-%d-%Y"
set table
n=0
* plot for [i=0:m-1] "Generation Data.txt" \
* using ($0>n?n=$0:0 , $0):17 every m::i
print n
do for [i=0:m-1] {
sum=0
* plot "Generation Data.txt" using 0:(sum=sum+$2 , $2) every m::i
av=sum/n
x=i*(n+1)
set arrow i+1 from x,av to x+n,av nohead lt 1 lc rgb "black"
}
unset table
mn="JanFebMarAprMayJunJulAugSepOctNovDec"
temp="set xtics ("
do for [i=0:m-1] {
if (i>0) {temp=temp.","}
temp=temp.sprintf("\"%s\" %d",substr(mn,3*i+1,3*i+3),n/2+i*(n+1))
}
temp=temp.")"
@temp
# and now the final plot
*plot for [i=0:m-1] "Generation Data.txt" \
* using (tm_mon(timecolumn(1))+$0+i*n):17 \
every m::i \
with linespoints \
lt 7 lc rgb "black"
--
View this message in context: http://old.nabble.com/Can-gnuplot-create-cycle-plots-%28also-called-month-plots%29--tp32276901p32339219.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: Mathias A. <mat...@li...> - 2011-08-26 00:37:27
|
Hello again everybody, just a little update, I found out that the new development version (gnuplot 4.5) is way faster on windows than the stable branch and just the "gnuplot --persist" command would be perfect for me now. But can anybody tell me whether it is an intended behaviour that "gnuplot --persist" opened via a pipe shows all the commands I write to it to the stdandard output (on linux that's not the case)? I mean principally that's exactly what I need but the messy output makes it unusable for me, I have then lines like gnuplot> set palette gray negative between my normal output (which doesn't look nice and takes long to print to the console). So is this a bug and might it be fixed or is it expected behaviour? Thanks Mathias |
|
From: Mathias A. <mat...@li...> - 2011-08-24 23:24:21
|
Hello, > GNU octave for windows uses gnuplot.exe. --persist option is not used. I have never used octave but I guess if you close octave your gnuplot window will be closed, too? That's what I don't want, since without "--persist" my gnuplot window closes after my c++ program is finished (which might be quite fast). And I have already tried to ffluch(pipe) after every command without success. Nevertheless thanks for your hints, more are welcomed ;) Greetings, Mathias |
|
From: Tatsuro M. <tma...@ya...> - 2011-08-24 23:10:02
|
Hello
GNU octave for windows uses gnuplot.exe. --persist option is not used.
How about fflush(pipe); at each command to flush buffer ?.
*************************
FILE *pipe = popen("gnuplot","w");
//adjust settings
fprintf(pipe, "set palette gray negative\n");fflush(pipe);
//plot
fprintf(pipe, "plot 'fileX.txt' matrix with image\n");fflush(pipe);
//close gnuplot pipe
pclose(pipe);
*****************************************
Regards
Tatsuro
--- On Thu, 2011/8/25, Mathias Anselmann wrote:
> Hello,
> I first tried to use gnuplot but if I use it wit the "--persist" swich all my commands that I pipe to gnuplot are shown in the standard output of cmd (and that very slowly) and unfortunately I need the "-p" switch.
> Greetings
> Mathias
>
> On Thu, 25 Aug 2011 07:28:07 +0900 (JST)
> Tatsuro MATSUOKA <tma...@ya...> wrote:
>
> > Hello
> > If you use gnuplot 4.4, use gnuplot instead of pgnuplot.
> > The gnuplot.exe is console program so that it can be treated the same as that in the linux. The pgnuplot is only for backward compatibility in gnuplot 4.4. distribution.
> >
> > Regards
> >
> > Tatsuro
>
|
|
From: Mathias A. <mat...@li...> - 2011-08-24 22:32:07
|
Hello, I first tried to use gnuplot but if I use it wit the "--persist" swich all my commands that I pipe to gnuplot are shown in the standard output of cmd (and that very slowly) and unfortunately I need the "-p" switch. Greetings Mathias On Thu, 25 Aug 2011 07:28:07 +0900 (JST) Tatsuro MATSUOKA <tma...@ya...> wrote: > Hello > If you use gnuplot 4.4, use gnuplot instead of pgnuplot. > The gnuplot.exe is console program so that it can be treated the same as that in the linux. The pgnuplot is only for backward compatibility in gnuplot 4.4. distribution. > > Regards > > Tatsuro |