Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

Ignorance is bliss. -- Thomas Gray Fortune updates the great quotes, #42: BLISS is ignorance.


computers / comp.graphics.apps.gnuplot / Plotting several curve using a for loop

SubjectAuthor
o Plotting several curve using a for loopMartin DAVID

1
Subject: Plotting several curve using a for loop
From: Martin DAVID
Newsgroups: comp.graphics.apps.gnuplot
Date: Fri, 21 Aug 2020 12:23 UTC
X-Received: by 2002:a05:620a:686:: with SMTP id f6mr2590882qkh.60.1598012638512;
Fri, 21 Aug 2020 05:23:58 -0700 (PDT)
X-Received: by 2002:a5b:78e:: with SMTP id b14mr3348344ybq.408.1598012638340;
Fri, 21 Aug 2020 05:23:58 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Fri, 21 Aug 2020 05:23:57 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=194.167.134.61; posting-account=u4EVpQoAAABBH-VxH8mZ0gnWaziURNj8
NNTP-Posting-Host: 194.167.134.61
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d0c0c15d-b946-44f0-b46b-3ceba89cd66bn@googlegroups.com>
Subject: Plotting several curve using a for loop
From: martinph...@gmail.com (Martin DAVID)
Injection-Date: Fri, 21 Aug 2020 12:23:58 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
Hello everyone,

I would like to plot several curve using a single line thank to a for loop.

I currently have :
plot @chemin_tot_DNS u (@yplusfroid_DNS):(@wT*rho_fr/qwsurcpmf_LES_DNS) @format_dns_fr title "SND", \
@chemin_tot_nomodel u (@yplusfroid_nomodel):(@wT*rho_fr/qwsurcpmf_LES_nomodel) @format_nomodel_fr title "Sans modele (Quick)",  \
@chemin_tot_fsim100sim100 every 1 u (@yplusfroid_fsim100sim100):(@wT*rho_fr/qwsurcpmf_LES_fsim100sim100) pt 1 @pts_fr title "Similarite (Quick)", \
@chemin_tot_fwal055wal055 every 1 u (@yplusfroid_fwal055wal055):(@wT*rho_fr/qwsurcpmf_LES_fwal055wal055) pt 8 @pts_fr title "WALE (Quick)"

plot @chemin_tot_DNS u (@yplusfroid_DNS):(@uT*rho_fr/qwsurcpmf_LES_DNS) @format_dns_fr title "SND", \
@chemin_tot_nomodel u (@yplusfroid_nomodel):(@uT*rho_fr/qwsurcpmf_LES_nomodel) @format_nomodel_fr title "Sans modele (Quick)",  \
@chemin_tot_fsim100sim100 every 1 u (@yplusfroid_fsim100sim100):(@uT*rho_fr/qwsurcpmf_LES_fsim100sim100) pt 1 @pts_fr title "Similarite (Quick)", \
@chemin_tot_fwal055wal055 every 1 u (@yplusfroid_fwal055wal055):(@uT*rho_fr/qwsurcpmf_LES_fwal055wal055) pt 8 @pts_fr title "WALE (Quick)", \


I would like to do something like :
liste="@chemin_tot_DNS @chemin_tot_nomodel @chemin_tot_fsim100sim100 @chemin_tot_fwal055wal055"
plot for [file in liste] file using (@yplusfroid_VARIABLE):(@wT*rho_fr/qwsurcpmf_LES_VARIABLE)
plot for [file in liste] file using (@yplusfroid_VARIABLE):(@uT*rho_fr/qwsurcpmf_LES_VARIABLE)

where VARIABLE take the value DNS when liste=chemin_tot_DNS, the value nomodel when liste=chemin_tot_nomodel...

I have 2 problem :
1) Gnuplot does not recognize the value @chemin_tot_DNS. This is not so problematic since I can give the value of @chemin_tot_DNS but if you know how to use the @chemin_tot_DNS in the for loop it would be wonderful.
2) I do not succeed in adapting VARIABLE in order that it changes values for each iteration of the for loop. Is there a solution to this issue ?

Thank you in advance for your answer,
Sincerely,
Martin


1
rocksolid light 0.7.2
clearneti2ptor