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


Groups > comp.graphics.apps.gnuplot > #1521

Re: iterative plot in parametric mode?

From sfeam <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: iterative plot in parametric mode?
Followup-To comp.graphics.apps.gnuplot
Date 2012-12-03 14:16 -0800
Organization gnuplot development team
Message-ID <k9j8bp$rlf$1@dont-email.me> (permalink)
References <k9gkmu$coi$1@news.rz.uni-karlsruhe.de> <k9ik0h$l42$1@dont-email.me> <k9j1eu$gal$1@news.rz.uni-karlsruhe.de>

Followups directed to: comp.graphics.apps.gnuplot

Show all headers | View raw


Karl wrote:

> 
> 
> On 03.12.2012 17:29, sfeam wrote:
>> Karl wrote:
>> 
>>> Is there a way to do it? The help says "iterations end at the next
>>> comma", and this
>>>
>>>
>>> gp> set param
>>> gp> plot for [i=1:4] cos(t*i), sin(t)
>>>
>>>
>>> even only gives a single (i=1) circle, so it does not iterate at all.
>> 
>> 
>> set xrange [-1:1]
>> set yrange [-1:1]
>> set samples 500
>> 
>> plot for [N=1:4] '+' using (sin(N * $1*pi)) : (cos($1*pi))
>> 
>> Note:  This does not use parametric mode.


> Thanks! Looks bit weird with the ranges, but not worse than the
> other proposal ab gave.
 
I'm not sure which part of it you are calling weird.
The CVS version now allows providing a sampling range in-line as part of
the plot command. So in version 4.7 (but not 4.6) you can say

  set xrange [-1:1]
  plot for [N=1:4] [t=-pi:pi] '+' using (sin(N * $1)) : (cos($1))

Does that address the weirdness?

I suppose it might be possible to have the sampled variable be recognized
as a synonym for $1, so that the command would look like

  plot for [N=1:4] [foo=-pi:pi] '+' using (sin(N * foo)) : (cos(foo))

But right now it doesn't work that way.

> Should i add this as a bug on sf.net, or have you taken care of it
> already?

'parametric mode' is treated as a special case in many places, and those
places know nothing about iteration.  My evaluation after a quick look
at the code is that adding support for iteration in all those places
would be a headache.  Since the method using sampled input from '+' 
already works in the general case, I don't see a whole lot of motivation
to tackle modification of the special case.

> And, btw.: Do you know if anyone is working on the windows build for
> 4.6.1 ?

If someone volunteers to provide executables then I can place them on 
SourceForge. Beyond that I'm not involved in coding or packaging
for Windows. Additional volunteers are welcome.

	Ethan

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

iterative plot in parametric mode? Karl <ratzsch@polymer.uka.de> - 2012-12-02 23:28 +0100
  Re: iterative plot in parametric mode? ab <ab.3942@googlemail.com> - 2012-12-02 23:24 -0800
    Re: iterative plot in parametric mode? Karl <mail.kfr@gmx.net> - 2012-12-03 09:19 +0100
      Re: iterative plot in parametric mode? ab <ab.3942@googlemail.com> - 2012-12-03 03:05 -0800
        Re: iterative plot in parametric mode? Karl <ratzsch@polymer.uka.de> - 2012-12-03 21:08 +0100
  Re: iterative plot in parametric mode? sfeam <sfeam@users.sourceforge.net> - 2012-12-03 08:29 -0800
    Re: iterative plot in parametric mode? Karl <ratzsch@polymer.uka.de> - 2012-12-03 21:18 +0100
      Re: iterative plot in parametric mode? sfeam <sfeam@users.sourceforge.net> - 2012-12-03 14:16 -0800
        Re: iterative plot in parametric mode? Karl <ratzsch@polymer.uka.de> - 2012-12-03 23:58 +0100
          Re: iterative plot in parametric mode? sfeam <sfeam@users.sourceforge.net> - 2012-12-03 15:55 -0800
            Re: iterative plot in parametric mode? Karl <mail.kfr@gmx.net> - 2012-12-04 14:11 +0100
            Re: iterative plot in parametric mode? iainleverett@gmail.com - 2013-04-08 15:01 -0700
              Re: iterative plot in parametric mode? sfeam <sfeam@users.sourceforge.net> - 2013-04-08 15:42 -0700
                Re: iterative plot in parametric mode? iainleverett@gmail.com - 2013-04-09 03:04 -0700
                Re: iterative plot in parametric mode? iainleverett@gmail.com - 2013-04-09 03:07 -0700
              Re: iterative plot in parametric mode? Karl <mail.kfr@gmx.net> - 2013-04-09 09:42 +0200

csiph-web