Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2231 > unrolled thread
| Started by | John Edwards <johned0@gmail.com> |
|---|---|
| First post | 2014-01-07 23:58 +0000 |
| Last post | 2014-01-08 13:49 +0000 |
| Articles | 16 — 5 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
Feature request : replot multiplot John Edwards <johned0@gmail.com> - 2014-01-07 23:58 +0000
Re: Feature request : replot multiplot Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2014-01-08 09:12 +0100
Re: Feature request : replot multiplot Karl <mail.kfr@gmx.net> - 2014-01-08 10:07 +0100
Re: Feature request : replot multiplot John Edwards <johned0@gmail.com> - 2014-01-08 10:50 +0000
Re: Feature request : replot multiplot Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2014-01-08 19:20 +0100
Re: Feature request : replot multiplot John Edwards <johned0@gmail.com> - 2014-01-08 18:44 +0000
Re: Feature request : replot multiplot Christoph Bersch <usenet@bersch.net> - 2014-01-08 20:05 +0100
Re: Feature request : replot multiplot John Edwards <johned0@gmail.com> - 2014-01-08 23:12 +0000
Re: Feature request : replot multiplot John Edwards <johned0@gmail.com> - 2014-01-08 10:51 +0000
Re: Feature request : replot multiplot Karl <mail.kfr@gmx.net> - 2014-01-08 14:38 +0100
Re: Feature request : replot multiplot John Edwards <johned0@gmail.com> - 2014-01-08 13:47 +0000
Re: Feature request : replot multiplot Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2014-01-08 19:23 +0100
Re: Feature request : replot multiplot Karl <mail.kfr@gmx.net> - 2014-01-08 09:48 +0100
Re: Feature request : replot multiplot Michael <proximum@land.ru> - 2014-01-08 15:47 +0700
Re: Feature request : replot multiplot Michael <proximum@land.ru> - 2014-01-08 20:18 +0700
Re: Feature request : replot multiplot John Edwards <johned0@gmail.com> - 2014-01-08 13:49 +0000
| From | John Edwards <johned0@gmail.com> |
|---|---|
| Date | 2014-01-07 23:58 +0000 |
| Subject | Feature request : replot multiplot |
| Message-ID | <bj3il0Fb18U1@mid.individual.net> |
Dear All, I have been trying to use multiplot to display multiple 2D data sets piped from an external program. Ideally I would like to be able to use autoscale/replot so that all of the graphs can be scaled according to the largest magnitude of any of the datasets. Searching for solutions to this functionality suggests that it is quite a common requirement. Does anyone know if there is any chance whether this functionality could or will be available in the future ? Thanks very much, John
[toc] | [next] | [standalone]
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Date | 2014-01-08 09:12 +0100 |
| Message-ID | <bj4fjeF5l5gU1@mid.dfncis.de> |
| In reply to | #2231 |
On 08.01.2014 00:58, John Edwards wrote: > I have been trying to use multiplot to display multiple 2D data sets > piped from an external program. Ideally I would like to be able to use > autoscale/replot so that all of the graphs can be scaled according to > the largest magnitude of any of the datasets. If that's what you want to do, multiplot is entirely the wrong tool for the job. > Searching for solutions to this functionality suggests that it is quite > a common requirement. And most of the time, people believing they need this have been abusing multiplot to begin with. Just like you did.
[toc] | [prev] | [next] | [standalone]
| From | Karl <mail.kfr@gmx.net> |
|---|---|
| Date | 2014-01-08 10:07 +0100 |
| Message-ID | <laj4go$970$1@news.rz.uni-karlsruhe.de> |
| In reply to | #2233 |
Am 08.01.2014 09:12, schrieb Hans-Bernhard Bröker: > On 08.01.2014 00:58, John Edwards wrote: > >> I have been trying to use multiplot to display multiple 2D data sets >> piped from an external program. Ideally I would like to be able to use >> autoscale/replot so that all of the graphs can be scaled according to >> the largest magnitude of any of the datasets. > > If that's what you want to do, multiplot is entirely the wrong tool for > the job. > >> Searching for solutions to this functionality suggests that it is quite >> a common requirement. > > And most of the time, people believing they need this have been abusing > multiplot to begin with. Just like you did. How about some constructive criticism, instead of biting people´s heads off? It´s a very reasonable demand, and of course you want to use multiplot for it. It´s just that the ranges would need to be known before starting multiplot, which is not possible if the data comes out of a pipe. Karl
[toc] | [prev] | [next] | [standalone]
| From | John Edwards <johned0@gmail.com> |
|---|---|
| Date | 2014-01-08 10:50 +0000 |
| Message-ID | <bj4oraF7kasU1@mid.individual.net> |
| In reply to | #2233 |
Hi Hans-Bernhard, Thank you very much for your reply and it raises two questions in my mind. Please could you explain the philosophy behind multiplot ? Could you tell me how I might be able to implement this kind of functionality in Gnuplot, if multiplot is not the best method. Thanks again for your time, John On 08/01/2014 08:12, Hans-Bernhard Bröker wrote: > On 08.01.2014 00:58, John Edwards wrote: > >> I have been trying to use multiplot to display multiple 2D data sets >> piped from an external program. Ideally I would like to be able to use >> autoscale/replot so that all of the graphs can be scaled according to >> the largest magnitude of any of the datasets. > > If that's what you want to do, multiplot is entirely the wrong tool for > the job. > >> Searching for solutions to this functionality suggests that it is quite >> a common requirement. > > And most of the time, people believing they need this have been abusing > multiplot to begin with. Just like you did.
[toc] | [prev] | [next] | [standalone]
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Date | 2014-01-08 19:20 +0100 |
| Message-ID | <bj5j7pFd9enU1@mid.dfncis.de> |
| In reply to | #2237 |
On 08.01.2014 11:50, John Edwards wrote: > Please could you explain the philosophy behind multiplot ? Multiplot is for making multiple, _independent_ plots in a single "page" of output. What you have appear to be multiple datasets that should end in the _same_ plot, because their scaling is dependent on each other. That's what plain and simple plot 'file1', 'file2', 'file3' is intended for.
[toc] | [prev] | [next] | [standalone]
| From | John Edwards <johned0@gmail.com> |
|---|---|
| Date | 2014-01-08 18:44 +0000 |
| Message-ID | <bj5kjmFdk79U1@mid.individual.net> |
| In reply to | #2243 |
Thanks very much, Hans-Bernhard, Does this mode work with pipes (the special filename '-') All the best, John On 08/01/2014 18:20, Hans-Bernhard Bröker wrote: > plot 'file1', 'file2', 'file3'
[toc] | [prev] | [next] | [standalone]
| From | Christoph Bersch <usenet@bersch.net> |
|---|---|
| Date | 2014-01-08 20:05 +0100 |
| Message-ID | <lak7hh$jlg$1@dont-email.me> |
| In reply to | #2245 |
On 08.01.2014 19:44, John Edwards wrote: > > Does this mode work with pipes (the special filename '-') Yes, that should work with pipes, like the 'inline' variant plot '-', '-' 1 2 3 e 2 3 4 e Christoph
[toc] | [prev] | [next] | [standalone]
| From | John Edwards <johned0@gmail.com> |
|---|---|
| Date | 2014-01-08 23:12 +0000 |
| Message-ID | <bj64bfFgvn8U1@mid.individual.net> |
| In reply to | #2246 |
Thanks Christoh, I'm a bit tied up wit other work for the next few days but I'll try it out asap. Cheers, John On 08/01/2014 19:05, Christoph Bersch wrote: > On 08.01.2014 19:44, John Edwards wrote: >> >> Does this mode work with pipes (the special filename '-') > > Yes, that should work with pipes, like the 'inline' variant > > plot '-', '-' > 1 > 2 > 3 > e > 2 > 3 > 4 > e > > Christoph
[toc] | [prev] | [next] | [standalone]
| From | John Edwards <johned0@gmail.com> |
|---|---|
| Date | 2014-01-08 10:51 +0000 |
| Message-ID | <bj4otcF7kasU2@mid.individual.net> |
| In reply to | #2233 |
> It´s just that the ranges would need to be known before starting > multiplot, which is not possible if the data comes out of a pipe. Hi Karl, You've absolutely hit the nail on the head. Unfortunately I do not always know the scale when first starting the plots. I did think about using your suggestion of "writing the datasets to a temporary file, and multiplot that". It might be the best workaround but unfortunately that would break the really neat pipe model. I also thought about storing the data locally but resending it over the pipe turns out to be very slow. Knowing that Gnuplot supports replot of the previous dataset I thought (maybe naively) that it might not be a massive task to add this functionality by just storing all the previous datasets rather than just the one. Cheers for now, John
[toc] | [prev] | [next] | [standalone]
| From | Karl <mail.kfr@gmx.net> |
|---|---|
| Date | 2014-01-08 14:38 +0100 |
| Message-ID | <lajkbu$fi3$1@news.rz.uni-karlsruhe.de> |
| In reply to | #2238 |
Am 08.01.2014 11:51, schrieb John Edwards: > > I did think about using your suggestion of "writing the datasets to a > temporary file, and multiplot that". It might be the best workaround but > unfortunately that would break the really neat pipe model. You could use "set table" to plot each dataset to a temporary file, and store the min/max values for each (found in GPVAL_DATA_X/Y_MIN/MAX after each plot). Afterwards chose the desired ranges, do your multiplot with the tempfiles, and then delete them using a "system" call.
[toc] | [prev] | [next] | [standalone]
| From | John Edwards <johned0@gmail.com> |
|---|---|
| Date | 2014-01-08 13:47 +0000 |
| Message-ID | <bj538eF9qr1U1@mid.individual.net> |
| In reply to | #2240 |
> You could use "set table" to plot each dataset to a temporary file, and > store the min/max values for each (found in GPVAL_DATA_X/Y_MIN/MAX after > each plot). Afterwards chose the desired ranges, do your multiplot with > the tempfiles, and then delete them using a "system" call. Thanks Karl, I wasn't aware of the table option but I have had a look. It is an interesting idea that I already researched using "save" instead of table. If I understand it correctly, table would require me to send each dataset twice - once to plot it as the graph is built up and once to save it to a file for replotting. I think an intermediate file solution might be better than piping the data. I'm still mulling this over. Cheers, John
[toc] | [prev] | [next] | [standalone]
| From | Hans-Bernhard Bröker <HBBroeker@t-online.de> |
|---|---|
| Date | 2014-01-08 19:23 +0100 |
| Message-ID | <bj5jd9FdbgaU1@mid.dfncis.de> |
| In reply to | #2238 |
On 08.01.2014 11:51, John Edwards wrote: > Unfortunately I do not > always know the scale when first starting the plots. If you don't know it, nothing else can. So gnuplot can't know how to scale that graph, either. The inevitable consequence is that you cannot make that graph until someone has had a chance to figure out what the scale is to be. I.e. you have to collect _all_ the data, somewhere. Only then can you proceed to make a plot.
[toc] | [prev] | [next] | [standalone]
| From | Karl <mail.kfr@gmx.net> |
|---|---|
| Date | 2014-01-08 09:48 +0100 |
| Message-ID | <laj3dh$8oq$1@news.rz.uni-karlsruhe.de> |
| In reply to | #2231 |
Am 08.01.2014 00:58, schrieb John Edwards: > Dear All, > > I have been trying to use multiplot to display multiple 2D data sets > piped from an external program. Ideally I would like to be able to use > autoscale/replot so that all of the graphs can be scaled according to > the largest magnitude of any of the datasets. > You mean you want all graphs to have the same scales, autoscaled according to the largest value in _all_ datasets? Can´t be done, i´m afraid, because only the properties of the current graph can be accessed. There´s no replotting the earlier graphs. Changing that would probably require to re-write half the code in gnuplot. Why don´t you write the datasets to a temporary file, and multiplot that?
[toc] | [prev] | [next] | [standalone]
| From | Michael <proximum@land.ru> |
|---|---|
| Date | 2014-01-08 15:47 +0700 |
| Message-ID | <laj3rt$2b4$1@dont-email.me> |
| In reply to | #2231 |
08.01.2014 06:58, John Edwards пишет: > Dear All, > > I have been trying to use multiplot to display multiple 2D data sets > piped from an external program. Ideally I would like to be able to use > autoscale/replot so that all of the graphs can be scaled according to > the largest magnitude of any of the datasets. > > Searching for solutions to this functionality suggests that it is quite > a common requirement. > > Does anyone know if there is any chance whether this functionality could > or will be available in the future ? > > Thanks very much, > > John I make thousands of multiplot graphs with the perl script. You just have to find min and max of data in your data files, and to create a gnuplot script cointaining these min and max definitions with the use of your external program.
[toc] | [prev] | [next] | [standalone]
| From | Michael <proximum@land.ru> |
|---|---|
| Date | 2014-01-08 20:18 +0700 |
| Message-ID | <lajjp3$mbe$1@dont-email.me> |
| In reply to | #2231 |
Maybe this would be helpful? 1.dat: 1 2 2 3 3 4 4 5 2.dat: 2 3 3 4 4 5 5 6 3.dat: 1 6 2 7 3 8 4 9 stats '1.dat' using 2 name 'A' stats '2.dat' using 2 name 'B' stats '3.dat' using 2 name 'C' min_val=(A_min<B_min ? A_min : B_min) min_val=(min_val<C_min ? min_val : C_min) max_val=(A_max>B_max ? A_max : B_max) max_val=(max_val>C_max ? max_val : C_max) set size 1.,1. set origin 0.,0. set multiplot set origin 0.0,0.0 set size 0.3,0.5 set yrange [min_val:max_val] plot '1.dat' using 1:2 with linespoints set origin 0.3,0.0 set size 0.3,0.5 set yrange [min_val:max_val] plot '2.dat' using 1:2 with linespoints set origin 0.6,0.0 set size 0.3,0.5 set yrange [min_val:max_val] plot '3.dat' using 1:2 with linespoints unset multiplot reset
[toc] | [prev] | [next] | [standalone]
| From | John Edwards <johned0@gmail.com> |
|---|---|
| Date | 2014-01-08 13:49 +0000 |
| Message-ID | <bj53beF9qr1U2@mid.individual.net> |
| In reply to | #2239 |
Thanks Michael, I don't think I can use this via pipes but I have looked at using intermediate files rather than pipes so this will definitely help. Cheers, John > Maybe this would be helpful? > > 1.dat: > 1 2 > 2 3 > 3 4 > 4 5 > > 2.dat: > 2 3 > 3 4 > 4 5 > 5 6 > > 3.dat: > 1 6 > 2 7 > 3 8 > 4 9 > > stats '1.dat' using 2 name 'A' > stats '2.dat' using 2 name 'B' > stats '3.dat' using 2 name 'C' > > min_val=(A_min<B_min ? A_min : B_min) > min_val=(min_val<C_min ? min_val : C_min) > max_val=(A_max>B_max ? A_max : B_max) > max_val=(max_val>C_max ? max_val : C_max) > > set size 1.,1. > set origin 0.,0. > > set multiplot > > set origin 0.0,0.0 > set size 0.3,0.5 > set yrange [min_val:max_val] > plot '1.dat' using 1:2 with linespoints > > > set origin 0.3,0.0 > set size 0.3,0.5 > set yrange [min_val:max_val] > plot '2.dat' using 1:2 with linespoints > > > set origin 0.6,0.0 > set size 0.3,0.5 > set yrange [min_val:max_val] > plot '3.dat' using 1:2 with linespoints > > unset multiplot > reset
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web