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: BBands <bb...@gm...> - 2013-10-03 15:46:07
|
See 'help xticlabels'.
john
On Thu, Oct 3, 2013 at 8:27 AM, Mahmood Naderan <nt_...@ya...> wrote:
> HiAssume the range of x-axis is [0:10000]. When I use
>
> plot "data.txt" u 1 every ::1000::2000
>
> the left most value in the x-axis is 0 and the right most is 1000 (which is the result of 2000-1000)
> How can I have labels from 1000~2000
|
|
From: Mahmood N. <nt_...@ya...> - 2013-10-03 15:27:16
|
HiAssume the range of x-axis is [0:10000]. When I use plot "data.txt" u 1 every ::1000::2000 the left most value in the x-axis is 0 and the right most is 1000 (which is the result of 2000-1000) How can I have labels from 1000~2000 ? Regards, Mahmood |
|
From: cédric o. <ced...@gm...> - 2013-10-01 08:52:32
|
2013/10/1, Clement Law <the...@gm...>: > Out of interest, what happens when you execute: > > plot 'file.dat' binary record=(15,-1) format='%float' u 1:2:3 w d pal I see dots where I expect. > instead of using 'w l pal' > Also, could you include the link which instructed you? Here is the link: http://stackoverflow.com/questions/15878211/pm3d-in-gnuplot-with-binary-data > > > On 30 September 2013 13:29, cédric ody <ced...@gm...> wrote: > >> In fact and to be more complete, this behaviour for splot is obtained >> with gnuplot 4.6 patchlevel 0. >> >> Crossing lines are also observed for splot AND plot command on the >> older version 4.2 patchlevel 2. So it is seems there have been >> progress between the two versions for the plot command. >> >> Cédric >> >> >> >> 2013/9/30, cédric ody <ced...@gm...>: >> > Hi, >> > >> > I have found a interesting comment on the web explaining how to plot >> > unstructured mesh written in a binary file in gnuplot. I knew to do >> > that in ascii but I have been looking for the binary possibility for a >> > while. >> > >> > The command is for instance the following >> > >> > plot 'file.dat' binary record=(15,-1) format='%float' u 1:2:3 w l >> > palette >> > >> > I wrote the binary file file.dat using octave (fwrite(file,vector)). >> > >> > The 15 is because I plot cells of 5 points of two coordinates + the >> > value at the point. >> > >> > cell=[ptA ptB ptC ptD ptA] >> > >> > vector=[ptAx ptAy ptAval ptBx ptBy ptBval ptCx ptCy ptCval ptDx ptDy >> > ptDval ptAx ptAy ptAval ...]; >> > >> > The plot command gives expected results (I would expect that I have >> > used an ascii filename). However, the splot command does not as some >> > cells of the unstructured mesh are now connected although they should >> > not. >> > >> > Does anybody know what I am missing. >> > >> > Thank you very much, >> > >> > Cédric >> > >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most >> from >> the latest Intel processors and coprocessors. See abstracts and register >> > >> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk >> _______________________________________________ >> gnuplot-info mailing list >> gnu...@li... >> Membership management via: >> https://lists.sourceforge.net/lists/listinfo/gnuplot-info >> > |
|
From: Clement L. <the...@gm...> - 2013-10-01 08:19:07
|
Out of interest, what happens when you execute: plot 'file.dat' binary record=(15,-1) format='%float' u 1:2:3 w d pal instead of using 'w l pal' Also, could you include the link which instructed you? On 30 September 2013 13:29, cédric ody <ced...@gm...> wrote: > In fact and to be more complete, this behaviour for splot is obtained > with gnuplot 4.6 patchlevel 0. > > Crossing lines are also observed for splot AND plot command on the > older version 4.2 patchlevel 2. So it is seems there have been > progress between the two versions for the plot command. > > Cédric > > > > 2013/9/30, cédric ody <ced...@gm...>: > > Hi, > > > > I have found a interesting comment on the web explaining how to plot > > unstructured mesh written in a binary file in gnuplot. I knew to do > > that in ascii but I have been looking for the binary possibility for a > > while. > > > > The command is for instance the following > > > > plot 'file.dat' binary record=(15,-1) format='%float' u 1:2:3 w l palette > > > > I wrote the binary file file.dat using octave (fwrite(file,vector)). > > > > The 15 is because I plot cells of 5 points of two coordinates + the > > value at the point. > > > > cell=[ptA ptB ptC ptD ptA] > > > > vector=[ptAx ptAy ptAval ptBx ptBy ptBval ptCx ptCy ptCval ptDx ptDy > > ptDval ptAx ptAy ptAval ...]; > > > > The plot command gives expected results (I would expect that I have > > used an ascii filename). However, the splot command does not as some > > cells of the unstructured mesh are now connected although they should > > not. > > > > Does anybody know what I am missing. > > > > Thank you very much, > > > > Cédric > > > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > |
|
From: cédric o. <ced...@gm...> - 2013-09-30 12:29:25
|
In fact and to be more complete, this behaviour for splot is obtained with gnuplot 4.6 patchlevel 0. Crossing lines are also observed for splot AND plot command on the older version 4.2 patchlevel 2. So it is seems there have been progress between the two versions for the plot command. Cédric 2013/9/30, cédric ody <ced...@gm...>: > Hi, > > I have found a interesting comment on the web explaining how to plot > unstructured mesh written in a binary file in gnuplot. I knew to do > that in ascii but I have been looking for the binary possibility for a > while. > > The command is for instance the following > > plot 'file.dat' binary record=(15,-1) format='%float' u 1:2:3 w l palette > > I wrote the binary file file.dat using octave (fwrite(file,vector)). > > The 15 is because I plot cells of 5 points of two coordinates + the > value at the point. > > cell=[ptA ptB ptC ptD ptA] > > vector=[ptAx ptAy ptAval ptBx ptBy ptBval ptCx ptCy ptCval ptDx ptDy > ptDval ptAx ptAy ptAval ...]; > > The plot command gives expected results (I would expect that I have > used an ascii filename). However, the splot command does not as some > cells of the unstructured mesh are now connected although they should > not. > > Does anybody know what I am missing. > > Thank you very much, > > Cédric > |
|
From: cédric o. <ced...@gm...> - 2013-09-30 10:59:56
|
Hi, I have found a interesting comment on the web explaining how to plot unstructured mesh written in a binary file in gnuplot. I knew to do that in ascii but I have been looking for the binary possibility for a while. The command is for instance the following plot 'file.dat' binary record=(15,-1) format='%float' u 1:2:3 w l palette I wrote the binary file file.dat using octave (fwrite(file,vector)). The 15 is because I plot cells of 5 points of two coordinates + the value at the point. cell=[ptA ptB ptC ptD ptA] vector=[ptAx ptAy ptAval ptBx ptBy ptBval ptCx ptCy ptCval ptDx ptDy ptDval ptAx ptAy ptAval ...]; The plot command gives expected results (I would expect that I have used an ascii filename). However, the splot command does not as some cells of the unstructured mesh are now connected although they should not. Does anybody know what I am missing. Thank you very much, Cédric |
|
From: Theo <th...@gm...> - 2013-09-28 06:47:54
|
> I sort of hate it when I hear can't be done... > > set format y "%.sG" > > John > Really??? At my GnuPlot 4.6 this just adds G at each tic lable. I think what Mahmood was looking for, e.g.: set yrange [1e-18:1e18] set ytics 10 set format y "%.2s %c" As Bernhard wrote... also look e.g. at the example in the Gnuplot 4.6 PDF manual, page 113, example 6. Theo. |
|
From: Leo B. <l_b...@us...> - 2013-09-27 19:47:20
|
> From: Mahmood Naderan <nt_...@ya...> > > Thanks a lot. I was writing a python script to preprocess the values! > > Just want to know how someone should conclude "%.sG" for such formatting? > From the manual http://gnuplot.sourceforge.net/docs_4.2/node184.html, we read: Mahmood, I would suggest an alternative approach to your problem: rescale your y values and include the scale information in the ylabel rather than in the tick labels. Leo |
|
From: Mahmood N. <nt_...@ya...> - 2013-09-27 18:11:57
|
Thanks a lot. I was writing a python script to preprocess the values! Just want to know how someone should conclude "%.sG" for such formatting? From the manual http://gnuplot.sourceforge.net/docs_4.2/node184.html, we read: If the format string is omitted, the format will be returned to the default "% g" ... %e or %E exponential notation; an "e" or "E" before the power %g or %G the shorter of %e (or %E) and %f ... The default format for both axes is "% g", but other formats such as "%.2f" or "%3.0em" are often desirable .... Characters not preceded by "%" are printed verbatim. Thus you can include spaces and labels in your format string, such as "%g m", which will put " m" after each number. If you want "%" itself, double it: "%g %%". Regards, Mahmood ________________________________ From: BBands <bb...@gm...> To: gnuplot <gnu...@li...> Sent: Friday, September 27, 2013 9:11 PM Subject: Re: [Gnuplot-info] formatting ytics I sort of hate it when I hear can't be done... set format y "%.sG" John On Fri, Sep 27, 2013 at 10:25 AM, Mahmood Naderan <nt_...@ya...> wrote: > Yes I know that but these specifiers are good for hex and scientific numbers > (for example 0x7F, 0x7f, 2E+2, e2+2). None of them convert a 3,000,000,000 > number to 3G. > I think I have to write a script to preprocess that. Thanks ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ gnuplot-info mailing list gnu...@li... Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: BBands <bb...@gm...> - 2013-09-27 17:41:42
|
I sort of hate it when I hear can't be done... set format y "%.sG" John On Fri, Sep 27, 2013 at 10:25 AM, Mahmood Naderan <nt_...@ya...> wrote: > Yes I know that but these specifiers are good for hex and scientific numbers > (for example 0x7F, 0x7f, 2E+2, e2+2). None of them convert a 3,000,000,000 > number to 3G. > I think I have to write a script to preprocess that. Thanks |
|
From: Hans-Bernhard B. <HBB...@T-...> - 2013-09-27 17:36:55
|
Am 27.09.2013 19:25, schrieb Mahmood Naderan: > Yes I know that but these specifiers are good for hex and scientific numbers (for example 0x7F, 0x7f, 2E+2, e2+2). None of them convert a 3,000,000,000 number to 3G. > I think I have to write a script to preprocess that. Thanks No, you don't. You only need to read all of "help set format", including the examples, and use what you learnt there. |
|
From: Mahmood N. <nt_...@ya...> - 2013-09-27 17:25:16
|
Yes I know that but these specifiers are good for hex and scientific numbers (for example 0x7F, 0x7f, 2E+2, e2+2). None of them convert a 3,000,000,000 number to 3G. I think I have to write a script to preprocess that. Thanks Regards, Mahmood ________________________________ From: BBands <bb...@gm...> To: gnuplot <gnu...@li...> Sent: Friday, September 27, 2013 8:30 PM Subject: Re: [Gnuplot-info] formatting ytics There are better examples here: http://www.cplusplus.com/reference/cstdio/printf/ Best, John On Fri, Sep 27, 2013 at 9:48 AM, Mahmood Naderan <nt_...@ya...> wrote: > >>set format y "%c" > It just show > G > G > G > M > there is no number ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ gnuplot-info mailing list gnu...@li... Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: BBands <bb...@gm...> - 2013-09-27 17:00:42
|
There are better examples here: http://www.cplusplus.com/reference/cstdio/printf/ Best, John On Fri, Sep 27, 2013 at 9:48 AM, Mahmood Naderan <nt_...@ya...> wrote: > >>set format y "%c" > It just show > G > G > G > M > there is no number |
|
From: BBands <bb...@gm...> - 2013-09-27 16:57:16
|
Mahmood, gnuplot formatting is very similar to C, so you can do just about anything you like. There is a good outline of the possibilities here. http://www.cplusplus.com/reference/cstdio/fprintf/ HTH, John On Fri, Sep 27, 2013 at 9:48 AM, Mahmood Naderan <nt_...@ya...> wrote: > >>set format y "%c" > It just show > G > G > G > M > there is no number |
|
From: Mahmood N. <nt_...@ya...> - 2013-09-27 16:48:13
|
>set format y "%c" It just show G G G M there is no number Regards, Mahmood ________________________________ From: Theo <th...@gm...> To: gnu...@li... Sent: Friday, September 27, 2013 7:32 PM Subject: Re: [Gnuplot-info] formatting ytics set format y "%c" ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ gnuplot-info mailing list gnu...@li... Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: Theo <th...@gm...> - 2013-09-27 16:02:45
|
set format y "%c" |
|
From: Mahmood N. <nt_...@ya...> - 2013-09-27 15:43:03
|
Hi Is there anyway to rename the y values from scientific to characters? for example "3e+9" to "3G". There are some formatting methods with '%' but I can not find which one can do the job. Regards, Mahmood |
|
From: Sebastien K. <seb...@ya...> - 2013-09-27 10:03:56
|
Hello, On 09/25/2013 10:26 PM, Hans-Bernhard Bröker wrote: > Well, if you decided not to tell gnuplot in any way, shape or form, that this are > dates, rather than ordinary numbers, how is it supposed to know that? Thank you for answering. I am well aware that I need to tell gnuplot in some way that this is date-related data, my question was how ;-) > See "help time/date", and particularly "help timefmt". Indeed, the last command is what I was looking for (input date format) > You'll have to change your input format, too. Week-of-year is not a supported > date format. Ok, I will change the data in file, add a field with a valid date format that can be read and plotted with a correct ranking by gnuplot, and use xticslabel to have week numbers on the x-axis. I'll let you know.. |
|
From: Ethan A M. <eam...@gm...> - 2013-09-27 05:25:55
|
On Thursday, 26 September 2013, Brian Osborne wrote: > All, > > I'm making nice clustered histograms but sometimes there are so many bars in the cluster and the bars are so narrow that there's no space within the bars to color, they are all black. Not so informative! > > Here's example code: > > reset > set title 'Test' > set terminal svg > set output test.svg > set style fill solid 1.00 border lt -1 > set style data histograms > set style histogram clustered gap 1 > set xtics border rotate by -90 > set auto x > > How do I tell gnuplot either to have no bar border or set the border to the same color as the bar? set style fill solid 1.0 noborder > Thanks again, > > Brian O. -- Tradition is not the worship of ashes, but the preservation of fire. - Gustav Mahler |
|
From: Brian O. <bos...@ve...> - 2013-09-26 23:07:18
|
All, I'm making nice clustered histograms but sometimes there are so many bars in the cluster and the bars are so narrow that there's no space within the bars to color, they are all black. Not so informative! Here's example code: reset set title 'Test' set terminal svg set output test.svg set style fill solid 1.00 border lt -1 set style data histograms set style histogram clustered gap 1 set xtics border rotate by -90 set auto x How do I tell gnuplot either to have no bar border or set the border to the same color as the bar? Alternatively I guess I could make the diagram much wider, would that work? Thanks again, Brian O. |
|
From: Hans-Bernhard B. <HBB...@T-...> - 2013-09-25 20:26:35
|
Am 25.09.2013 19:00, schrieb Sebastien Kramm: > # week;year;value > 50;2013;10 > 51;2013;11 > 2;2014;12 > > with: > plot "datafile" using $1:$3 > then week 2 will appear *before* week 51, and what I want on the x-axis is: Well, if you decided not to tell gnuplot in any way, shape or form, that this are dates, rather than ordinary numbers, how is it supposed to know that? See "help time/date", and particularly "help timefmt". You'll have to change your input format, too. Week-of-year is not a supported date format. |
|
From: Sebastien K. <seb...@ya...> - 2013-09-25 17:20:02
|
Dear gnuplot users and developpers, I want to plot a datafile were the x-axis data values are the week numbers of a year, stored in the datafile. I am producing the datafile from some other application, so I can easily change what is stored in it, if needed. My problem is that for a given year (from september to july), week 2 is after week 51. If I plot the following toy file: # week;year;value 50;2013;10 51;2013;11 2;2014;12 with: plot "datafile" using $1:$3 then week 2 will appear *before* week 51, and what I want on the x-axis is: 50 51 2 I checked out the "set format" command, but it seems to be only about format rendering, my problem is about input date format. Any hint on the easiest way to do this ? Thank you |
|
From: Leo B. <l_b...@us...> - 2013-09-19 15:31:19
|
> From: Leo Butler <l_b...@us...>
> CC: <gnu...@li...>
>
>
> > Date: Thu, 19 Sep 2013 04:51:31 -0700
> > From: "atoms.h" <tho...@gm...>
> > Content-Type: text/plain; charset="us-ascii"
> >
> > Hi,
> >
> > I'm trying to make use of the iteration feature, so far unsuccessfully. I
> > want to plot files in different directories with the same file name. All in
> > one pdf documents. The way I construct my paths is by means of string
> > variables:
> >
> > $ basefolder = '../data/scalePr/'
> > $ folder1 = '0.90'
> > $ folder2 = '0.95'
> > $ folder3 = '0.97'
> > $ folder4 = '1.00'
> > $ file1 = basefolder.folder1."/".filename.".dat"
> > $ file2 = basefolder.folder2."/".filename.".dat"
> > $ file3 = basefolder.folder3."/".filename.".dat"
> > $ file4 = basefolder.folder4."/".filename.".dat"
> >
> > I haven't figured out a way to iterate through variable names like
> >
> > $ file(n) = basefolder.folder.sprintf("%d",n)."/".filename.".dat"
> >
> > (which obviously doesn't work) to be able to do multiple plots in one
> > command:
> >
> > $ do for [i=1:4]{
> > $ splot file(i)
> > $ }
> >
> > If anyone has an idea how to iterate variable names it would be most
> > appreciated!
>
> It is probably best to use strings with separators to implement a type
> of read-only string array. Here is one such effort
>
> gnuplot> directory="/home/user"
> gnuplot> files="a0 a1 a2 a3 "
> gnuplot> sep=" "
> gnuplot> c=strstrt(files,sep);
> gnuplot>
> gnuplot> while (c) { w=sprintf("%s/%s",directory,files[0:c-1]);
> more> print w;
> more> files=files[c+1:*]
> more> c=strstrt(files,sep);
> more> }
> /home/user/a0
> /home/user/a1
> /home/user/a2
> /home/user/a3
>
> With a bit more work you can make a custom iterator:
>
> gnuplot> files="a0 a1 a2 a3 a4 a5 a6 "
> gnuplot> iterate_over_(string,sep,cmd,s,c)=(c == 0 ? s :\
> >iterate_over_(string[c+1:*],sep,cmd,s . (c == -1 ? "" : sprintf(cmd,string[0:with_iterate_over_c-1])), strstrt(string[c+1:*],sep)));
That should have been:
iterate_over_(string,sep,cmd,s,c)=(c == 0 ? s :\
iterate_over_(string[c+1:*],sep,cmd,s . (c == -1 ? "" : sprintf(cmd,string[0:c-1])), strstrt(string[c+1:*],sep)));
I made a mistake copying from my work buffer, I guess.
To explain: iterate_over_ is a tail-recursive function that
recursively assembles a command string s, using the sprintf prototype
cmd, and the input string string which is separated by sep.
> gnuplot> iterate_over(string,sep,cmd)=iterate_over_(string,sep,cmd,"",-1);
You can eval the output of iterate_over, or you could define a 3rd
function that does that for you.
> gnuplot>
> gnuplot> print iterate_over(files,sep,"file='%s'; splot directory .'/'. file;\n")
> file='a0'; splot directory .'/'. file;
> file='a1'; splot directory .'/'. file;
> file='a2'; splot directory .'/'. file;
> file='a3'; splot directory .'/'. file;
> file='a4'; splot directory .'/'. file;
> file='a5'; splot directory .'/'. file;
> file='a6'; splot directory .'/'. file;
Leo
|
|
From: Leo B. <l_b...@us...> - 2013-09-19 13:54:08
|
> Date: Thu, 19 Sep 2013 04:51:31 -0700
> From: "atoms.h" <tho...@gm...>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
>
> I'm trying to make use of the iteration feature, so far unsuccessfully. I
> want to plot files in different directories with the same file name. All in
> one pdf documents. The way I construct my paths is by means of string
> variables:
>
> $ basefolder = '../data/scalePr/'
> $ folder1 = '0.90'
> $ folder2 = '0.95'
> $ folder3 = '0.97'
> $ folder4 = '1.00'
> $ file1 = basefolder.folder1."/".filename.".dat"
> $ file2 = basefolder.folder2."/".filename.".dat"
> $ file3 = basefolder.folder3."/".filename.".dat"
> $ file4 = basefolder.folder4."/".filename.".dat"
>
> I haven't figured out a way to iterate through variable names like
>
> $ file(n) = basefolder.folder.sprintf("%d",n)."/".filename.".dat"
>
> (which obviously doesn't work) to be able to do multiple plots in one
> command:
>
> $ do for [i=1:4]{
> $ splot file(i)
> $ }
>
> If anyone has an idea how to iterate variable names it would be most
> appreciated!
It is probably best to use strings with separators to implement a type
of read-only string array. Here is one such effort
gnuplot> directory="/home/user"
gnuplot> files="a0 a1 a2 a3 "
gnuplot> sep=" "
gnuplot> c=strstrt(files,sep);
gnuplot>
gnuplot> while (c) { w=sprintf("%s/%s",directory,files[0:c-1]);
more> print w;
more> files=files[c+1:*]
more> c=strstrt(files,sep);
more> }
/home/user/a0
/home/user/a1
/home/user/a2
/home/user/a3
With a bit more work you can make a custom iterator:
gnuplot> files="a0 a1 a2 a3 a4 a5 a6 "
gnuplot> iterate_over_(string,sep,cmd,s,c)=(c == 0 ? s :\
>iterate_over_(string[c+1:*],sep,cmd,s . (c == -1 ? "" : sprintf(cmd,string[0:with_iterate_over_c-1])), strstrt(string[c+1:*],sep)));
gnuplot> iterate_over(string,sep,cmd)=iterate_over_(string,sep,cmd,"",-1);
gnuplot>
gnuplot> print iterate_over(files,sep,"file='%s'; splot directory .'/'. file;\n")
file='a0'; splot directory .'/'. file;
file='a1'; splot directory .'/'. file;
file='a2'; splot directory .'/'. file;
file='a3'; splot directory .'/'. file;
file='a4'; splot directory .'/'. file;
file='a5'; splot directory .'/'. file;
file='a6'; splot directory .'/'. file;
Leo
|
|
From: atoms.h <tho...@gm...> - 2013-09-19 11:51:37
|
Hi,
I'm trying to make use of the iteration feature, so far unsuccessfully. I
want to plot files in different directories with the same file name. All in
one pdf documents. The way I construct my paths is by means of string
variables:
$ basefolder = '../data/scalePr/'
$ folder1 = '0.90'
$ folder2 = '0.95'
$ folder3 = '0.97'
$ folder4 = '1.00'
$ file1 = basefolder.folder1."/".filename.".dat"
$ file2 = basefolder.folder2."/".filename.".dat"
$ file3 = basefolder.folder3."/".filename.".dat"
$ file4 = basefolder.folder4."/".filename.".dat"
I haven't figured out a way to iterate through variable names like
$ file(n) = basefolder.folder.sprintf("%d",n)."/".filename.".dat"
(which obviously doesn't work) to be able to do multiple plots in one
command:
$ do for [i=1:4]{
$ splot file(i)
$ }
If anyone has an idea how to iterate variable names it would be most
appreciated!
Kind regards,
Thomas
--
View this message in context: http://gnuplot.10905.n7.nabble.com/string-variables-and-iteration-gnuplot-4-6-tp17670.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|