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


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

Re: For loop not working as I expected - but now solved

Path csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Karl Ratzsch <mail.kfr@gmx.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: For loop not working as I expected - but now solved
Date Mon, 19 Feb 2018 16:11:04 +0100
Organization solani.org
Lines 23
Message-ID <p6epe8$g0$1@solani.org> (permalink)
References <p69m96$82n$1@dont-email.me> <p6dti7$cpk$1@solani.org> <p6eh76$i4j$1@dont-email.me> <p6ejat$rqg$1@solani.org> <p6emic$npo$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace solani.org 1519053064 512 eJwFwYEBwDAEBMCV6PNhHDT2HyF3DirnGJ3m67stlHMZkjYFBMD8EFWq0jqtf0YIktenBw8GKBBp (19 Feb 2018 15:11:04 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Mon, 19 Feb 2018 15:11:04 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0
Content-Language en-GB
X-User-ID eJwVx8ERgEAIA8CWUAiRchgh/Zdw+tuF55UvI5EBQVGce0hvyGRkizTqqe6NtYn1sq/4OX4AGK4RGg==
Cancel-Lock sha1:koXSERXDzrVB4iNUE9+MHq9sqBw=
In-Reply-To <p6emic$npo$1@dont-email.me>
X-NNTP-Posting-Host eJwFwQEBACAIA7BKAv+VOIrSP4IbQ6aaEAU2O8/19+hD0NDcvfHK7nDEYUYwbbmjV7OErA8SsBB3
Xref csiph.com comp.graphics.apps.gnuplot:3878

Show key headers only | View raw


Am 19.02.2018 um 15:22 schrieb Chris Elvidge:

> I put it down to my misreading (i.e. not fully understanding what is 
> going on) of this (first example) where 'plot [-10:10]' is used; 'for' 
> is not mentioned:
> 
> http://gnuplot.sourceforge.net/demo_svg_5.0/simple.html


The full syntax for plot iteration is this:

  plot {[xmin:xmax] {[ymin:ymax]}} for [i=a:b] F(x)

, where everything in curly brackets is optional. Try

  plot [-2:2] [-5:10] x**2

against

  plot for [i=0:3] x**i

xmin,xmax,ymin,ymax just give the length of the axes, while iteration
needs the "for" keyword.

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


Thread

For loop not working as I expected Chris Elvidge <chris@mshome.net> - 2018-02-17 16:46 +0000
  Re: For loop not working as I expected Karl Ratzsch <mail.kfr@gmx.net> - 2018-02-19 08:15 +0100
    Re: For loop not working as I expected - but now solved Chris Elvidge <chris@mshome.net> - 2018-02-19 12:50 +0000
      Re: For loop not working as I expected - but now solved Karl Ratzsch <mail.kfr@gmx.net> - 2018-02-19 14:26 +0100
        Re: For loop not working as I expected - but now solved Chris Elvidge <chris@mshome.net> - 2018-02-19 14:22 +0000
          Re: For loop not working as I expected - but now solved Karl Ratzsch <mail.kfr@gmx.net> - 2018-02-19 16:11 +0100
            Re: For loop not working as I expected - but now solved Chris Elvidge <chris@mshome.net> - 2018-02-19 15:25 +0000
        Re: For loop not working as I expected - but now solved Ethan A Merritt <EAMerritt@gmail.com> - 2018-02-21 22:38 -0800
          Re: For loop not working as I expected - but now solved Karl Ratzsch <mail.kfr@gmx.net> - 2018-02-23 18:50 +0100

csiph-web