Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3744 > unrolled thread

Plotting many curves?

Started byCass Sackett <casackett@gmail.com>
First post2017-09-11 09:30 -0700
Last post2017-09-13 09:09 +0200
Articles 9 — 5 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  Plotting many curves? Cass Sackett <casackett@gmail.com> - 2017-09-11 09:30 -0700
    Re: Plotting many curves? Cass Sackett <casackett@gmail.com> - 2017-09-11 09:38 -0700
      Re: Plotting many curves? Karl Ratzsch <mail.kfr@gmx.net> - 2017-09-11 23:16 +0200
      Re: Plotting many curves? Ethan A Merritt <EAMerritt@gmail.com> - 2017-09-12 18:30 -0700
        Re: Plotting many curves? Cass Sackett <casackett@gmail.com> - 2017-09-13 06:55 -0700
          Re: Plotting many curves? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2017-09-13 22:46 +0200
    Re: Plotting many curves? Jörg Buchholz <bookwood4new@freenet.de> - 2017-09-12 13:06 +0200
      Re: Plotting many curves? Cass Sackett <casackett@gmail.com> - 2017-09-12 06:25 -0700
        Re: Plotting many curves? Jörg Buchholz <bookwood4new@freenet.de> - 2017-09-13 09:09 +0200

#3744 — Plotting many curves?

FromCass Sackett <casackett@gmail.com>
Date2017-09-11 09:30 -0700
SubjectPlotting many curves?
Message-ID<81a289ce-bba5-424e-86ec-e24cc94d69a8@googlegroups.com>
I'm trying to make a complicated plot with many individual curves, like

plot \
  x1(t), y1(t), \
  x2(t), y2(t), \
  x3(t), y3(t), \
  x4(t), y4(t), \
  x5(t), y5(t), \
  x6(t), y6(t), \
  x7(t), y7(t), \
  x8(t), y8(t), \
etc

After about 20 functions, it starts to generate errors. It looks like there is  a limit on the length of the command line? If that is my problem, is there any way to work around this?

Thanks!

[toc] | [next] | [standalone]


#3745

FromCass Sackett <casackett@gmail.com>
Date2017-09-11 09:38 -0700
Message-ID<c093a27d-521f-449d-aef4-3b4de5bc9b48@googlegroups.com>
In reply to#3744
OK I see there is a "MAX_LINE_LEN" definition in the source code that would need to be changed, cf http://www.delorie.com/gnu/docs/octave/octave_182.html

Any chance someone here knows how to do that in windows?

[toc] | [prev] | [next] | [standalone]


#3746

FromKarl Ratzsch <mail.kfr@gmx.net>
Date2017-09-11 23:16 +0200
Message-ID<op6ufs$mv2$1@solani.org>
In reply to#3745
Am 11.09.2017 um 18:38 schrieb Cass Sackett:
> OK I see there is a "MAX_LINE_LEN" definition in the source code that would need to be changed, cf 
> 
> Any chance someone here knows how to do that in windows?
> 

I haven't looked into it now, but could that be a limitation of the
"parametric" mode?

You might want to try the special filename "+":

  plot "+" us (x):(f1(x)), \
       "+" us (x):(f2(x)), \
	...


fwiw, the link you gave is decades old. What version of gnuplot are
you using, and what problem do you actually observe? Can you provide
an example?

   Karl

[toc] | [prev] | [next] | [standalone]


#3749

FromEthan A Merritt <EAMerritt@gmail.com>
Date2017-09-12 18:30 -0700
Message-ID<opa1oq$ij4$1@dont-email.me>
In reply to#3745
Cass Sackett wrote:

> OK I see there is a "MAX_LINE_LEN" definition in the source code that
> would need to be changed, cf
> http://www.delorie.com/gnu/docs/octave/octave_182.html
> 
> Any chance someone here knows how to do that in windows?

Current versions of gnuplot use MAX_LINE_LEN only as a starting point.
More space in the input buffer is allocated as needed.

There is a limitation on the length of lines in a text data file,
but since you are plotting functions that is not relevant.

It would help if you actually reported what the error messages were.

On the other hand, the link you provided was to Octave documentation
rather than gnuplot.  Are you actually running Octave rather than
directly running gnuplot?


	Ethan

[toc] | [prev] | [next] | [standalone]


#3751

FromCass Sackett <casackett@gmail.com>
Date2017-09-13 06:55 -0700
Message-ID<9342c95e-8745-41dc-a7e1-f448b2a77738@googlegroups.com>
In reply to#3749
On Tuesday, September 12, 2017 at 9:31:10 PM UTC-4, Ethan A Merritt wrote:
> Cass Sackett wrote:
> 
> > OK I see there is a "MAX_LINE_LEN" definition in the source code that
> > would need to be changed, cf
> > http://www.delorie.com/gnu/docs/octave/octave_182.html
> > 
> > Any chance someone here knows how to do that in windows?
> 
> Current versions of gnuplot use MAX_LINE_LEN only as a starting point.
> More space in the input buffer is allocated as needed.
> 
> There is a limitation on the length of lines in a text data file,
> but since you are plotting functions that is not relevant.
> 
> It would help if you actually reported what the error messages were.
> 
> On the other hand, the link you provided was to Octave documentation
> rather than gnuplot.  Are you actually running Octave rather than
> directly running gnuplot?
> 
> 
> 	Ethan

I am running gnuplot 5.0, patchlevel 6. The link to Octave was just because that was the place I found that talked about the line length problem in gnuplot.

The error (when I got it) looked like my plot command line had ended prematurely, and gnuplot was expecting another argument. But since the problem went away I can't cite the error exactly.


> There are three things that makes life with gnuplot easier (IMHO). 
> 
> - Keep all your scripts in UTF8 encoding 
> - First line in all scripts "reset" 
> - Second line in all scripts "set encoding utf8" 
> 
> The "reset" command don't reset anything in gnuplot (see 
> help/documentation). So after several hours of work with gnuplot, and or 
> you get unexpected results, it is a good idea to restart gnuplot. 
> 
> Jörg 

I knew about reset, and had that. But not about utf8, I will put that in. Thanks for advice. And I should have known to try restarting.

[toc] | [prev] | [next] | [standalone]


#3752

FromHans-Bernhard Bröker <HBBroeker@t-online.de>
Date2017-09-13 22:46 +0200
Message-ID<f1tjphFiit6U1@mid.dfncis.de>
In reply to#3751
Am 13.09.2017 um 15:55 schrieb Cass Sackett:

> The error (when I got it) looked like my plot command line had ended 
> prematurely, and gnuplot was expecting another argument. But since
> the problem went away I can't cite the error exactly.
This usually _does_ come from using gnuplot as the backend to some other 
program, like Octave does, on Windows, and then it has nothing to do 
with any actual command line length limit.  It's a pipe overrun between 
the front-end program and gnuplot.

[toc] | [prev] | [next] | [standalone]


#3747

FromJörg Buchholz <bookwood4new@freenet.de>
Date2017-09-12 13:06 +0200
Message-ID<op8f4g$cvm$1@dont-email.me>
In reply to#3744
On 11.09.2017 18:30, Cass Sackett wrote:
> I'm trying to make a complicated plot with many individual curves, like
> 
> plot \
>   x1(t), y1(t), \
>   x2(t), y2(t), \
>   x3(t), y3(t), \
>   x4(t), y4(t), \
>   x5(t), y5(t), \
>   x6(t), y6(t), \
>   x7(t), y7(t), \
>   x8(t), y8(t), \
> etc
> 
> After about 20 functions, it starts to generate errors. It looks like there is  a limit on the length of the command line? If that is my problem, is there any way to work around this?
> 
> Thanks!
> 

No problem with:

set parametric
plot [-10:10][-10:10][-10:10]\
sin(t)/t,t ,\
sin(t),cos(t) ,\
t,sin(t)/t ,\
sin(t)/t,cos(t)/t ,\
t,log(t) ,\
-t,log(t) ,\
sin(t),t**2 ,\
-sin(t),t**2 ,\
tan(t),t, \
t,tan(t),\
-t,t ,\
cos(t),cos(2*t) ,\
2*cos(t),sin(t) ,\
-cosh(t),sinh(t),\
(sin(t)/t)-5,t ,\
(sin(t)/t)-4,t ,\
(sin(t)/t)-3,t ,\
(sin(t)/t)-2,t ,\
(sin(t)/t)-1,t ,\
(sin(t)/t)+1,t ,\
(sin(t)/t)+2,t ,\
(sin(t)/t)+3,t ,\
(sin(t)/t)+4,t ,\
(sin(t)/t)+5,t

Jörg

[toc] | [prev] | [next] | [standalone]


#3748

FromCass Sackett <casackett@gmail.com>
Date2017-09-12 06:25 -0700
Message-ID<dc2bb273-01b7-4888-83c4-81719b1ee90b@googlegroups.com>
In reply to#3747
On Tuesday, September 12, 2017 at 7:06:58 AM UTC-4, Jörg Buchholz wrote:
> On 11.09.2017 18:30, Cass Sackett wrote:
> > I'm trying to make a complicated plot with many individual curves, like
> > 
> > plot \
> >   x1(t), y1(t), \
> >   x2(t), y2(t), \
> >   x3(t), y3(t), \
> >   x4(t), y4(t), \
> >   x5(t), y5(t), \
> >   x6(t), y6(t), \
> >   x7(t), y7(t), \
> >   x8(t), y8(t), \
> > etc
> > 
> > After about 20 functions, it starts to generate errors. It looks like there is  a limit on the length of the command line? If that is my problem, is there any way to work around this?
> > 
> > Thanks!
> > 
> 
> No problem with:
> 
> set parametric
> plot [-10:10][-10:10][-10:10]\
> sin(t)/t,t ,\
> sin(t),cos(t) ,\
> t,sin(t)/t ,\
> sin(t)/t,cos(t)/t ,\
> t,log(t) ,\
> -t,log(t) ,\
> sin(t),t**2 ,\
> -sin(t),t**2 ,\
> tan(t),t, \
> t,tan(t),\
> -t,t ,\
> cos(t),cos(2*t) ,\
> 2*cos(t),sin(t) ,\
> -cosh(t),sinh(t),\
> (sin(t)/t)-5,t ,\
> (sin(t)/t)-4,t ,\
> (sin(t)/t)-3,t ,\
> (sin(t)/t)-2,t ,\
> (sin(t)/t)-1,t ,\
> (sin(t)/t)+1,t ,\
> (sin(t)/t)+2,t ,\
> (sin(t)/t)+3,t ,\
> (sin(t)/t)+4,t ,\
> (sin(t)/t)+5,t
> 
> Jörg

Well, I'm not sure what to say. Your example works, and this morning both my real script and my test script work too. They certainly didn't yesterday. I've quit and restart gnuplot since then, can't remember if I tried that before posting. I'll repost if I can recreate the problem. At any rate, thanks for looking into it.

[toc] | [prev] | [next] | [standalone]


#3750

FromJörg Buchholz <bookwood4new@freenet.de>
Date2017-09-13 09:09 +0200
Message-ID<opaljd$bau$1@dont-email.me>
In reply to#3748
On 12.09.2017 15:25, Cass Sackett wrote:

> Well, I'm not sure what to say. Your example works, and this morning
> both my real script and my test script work too. They certainly
> didn't yesterday. I've quit and restart gnuplot since then, can't
> remember if I tried that before posting. I'll repost if I can
> recreate the problem. At any rate, thanks for looking into it.
> 

There are three things that makes life with gnuplot easier (IMHO).

- Keep all your scripts in UTF8 encoding
- First line in all scripts "reset"
- Second line in all scripts "set encoding utf8"

The "reset" command don't reset anything in gnuplot (see
help/documentation). So after several hours of work with gnuplot, and or
you get unexpected results, it is a good idea to restart gnuplot.

Jörg

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web