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


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

plot for [i = 'list of numbers']

Path csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From Jörg Buchholz <bookwood4new@freenet.de>
Newsgroups comp.graphics.apps.gnuplot
Subject plot for [i = 'list of numbers']
Date Tue, 13 Jul 2021 14:11:01 +0200
Organization A noiseless patient Spider
Lines 27
Message-ID <scjvsl$9af$1@dont-email.me> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Injection-Date Tue, 13 Jul 2021 12:11:01 -0000 (UTC)
Injection-Info reader02.eternal-september.org; posting-host="7508434d1982e7714dc3d40234be403d"; logging-data="9551"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NM2JybfSwZa287/7AKTulpN7JplkBU5w="
User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0
Cancel-Lock sha1:eKjild1rugxyGjkaDzt+u/gTxPo=
Content-Language en-GB
X-Mozilla-News-Host news://news.eternal-september.org:119
Xref csiph.com comp.graphics.apps.gnuplot:4420

Show key headers only | View raw


Hello,

I have a dataset with 10 columns. First I will plot most of them and I use:

plot for [i = 3:10] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)

in a second plot I will plot only column 6,8 and 9. Is there a way to
use a list of numeric or only a list of strings.

Plot for [i = 6, 8, 9] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)

or

list = "6 8 9"
plot for [i in list] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)

Does not work. A solution that works is the following, but it is little
more work.

plot for [i = 6:8:2] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2),\
for [i = 9:9] '' skip 6 u 2:i w l t sprintf("T_%i",i-2)




Jörg

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


Thread

plot for [i = 'list of numbers'] Jörg Buchholz <bookwood4new@freenet.de> - 2021-07-13 14:11 +0200
  Re: plot for [i = 'list of numbers'] Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2021-07-13 14:37 +0200
    Re: plot for [i = 'list of numbers'] Jörg Buchholz <bookwood4new@freenet.de> - 2021-07-14 07:07 +0200

csiph-web