Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3333 > unrolled thread
| Started by | explorat123@gmail.com |
|---|---|
| First post | 2016-06-07 12:22 -0700 |
| Last post | 2016-06-17 03:39 -0700 |
| Articles | 9 — 3 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
Plot datafiles in bulk explorat123@gmail.com - 2016-06-07 12:22 -0700
Re: Plot datafiles in bulk Karl Ratzsch <mail.kfr@gmx.net> - 2016-06-07 22:17 +0200
Re: Plot datafiles in bulk Ethan A Merritt <EAMerritt@gmail.com> - 2016-06-07 21:49 -0700
Re: Plot datafiles in bulk Karl Ratzsch <mail.kfr@gmx.net> - 2016-06-08 10:34 +0200
Re: Plot datafiles in bulk explorat123@gmail.com - 2016-06-09 13:13 -0700
Re: Plot datafiles in bulk Karl Ratzsch <mail.kfr@gmx.net> - 2016-06-10 01:54 +0200
Re: Plot datafiles in bulk explorat123@gmail.com - 2016-06-13 00:16 -0700
Re: Plot datafiles in bulk Karl Ratzsch <mail.kfr@gmx.net> - 2016-06-13 09:26 +0200
Re: Plot datafiles in bulk explorat123@gmail.com - 2016-06-17 03:39 -0700
| From | explorat123@gmail.com |
|---|---|
| Date | 2016-06-07 12:22 -0700 |
| Subject | Plot datafiles in bulk |
| Message-ID | <1e061eba-f693-4eee-9f63-ce7809dc5f91@googlegroups.com> |
Hi, I'd like to plot multiple .csv files in bulk, regardless of their names: 20151221-Log.csv 20160315-Log.csv 20160601-Log.csv ... Each of them contains data in the form: 1,18711,9501,888,0.00,2.19 2,18726,9501,897,0.00,2.19 3,18741,9501,900,0.00,2.17 ... Is there an easy way to do this without having to specify the name for each individual file and without having to join the files ? Something like using a wildcard in DOS: plot '*-Log.csv' u 1:2 , '' u 1:3 or even: plot '*.csv' u 1:2 , '' u 1:3 Thanks
[toc] | [next] | [standalone]
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2016-06-07 22:17 +0200 |
| Message-ID | <nj7a4j$g5l$1@solani.org> |
| In reply to | #3333 |
Am 07.06.2016 um 21:22 schrieb explorat123@gmail.com:
> Hi,
>
> I'd like to plot multiple .csv files in bulk, regardless of their names:
> 20151221-Log.csv
> 20160315-Log.csv
> 20160601-Log.csv
> ...
>
> Is there an easy way to do this without having to specify the name for each individual file and without having to join the files ?
"plot" obviously does not support wild cards, but something like
fnlist = system("ls *.csv")
n = words(fnlist)
fname = word(fnlist,i)
plot for [i=1:n] fname(i) using ....
could work.
[toc] | [prev] | [next] | [standalone]
| From | Ethan A Merritt <EAMerritt@gmail.com> |
|---|---|
| Date | 2016-06-07 21:49 -0700 |
| Message-ID | <nj885j$5u4$1@dont-email.me> |
| In reply to | #3334 |
Karl Ratzsch wrote:
> Am 07.06.2016 um 21:22 schrieb explorat123@gmail.com:
>> Hi,
>>
>> I'd like to plot multiple .csv files in bulk, regardless of their
>> names: 20151221-Log.csv
>> 20160315-Log.csv
>> 20160601-Log.csv
>> ...
>
>>
>> Is there an easy way to do this without having to specify the name
>> for each individual file and without having to join the files ?
>
>
> "plot" obviously does not support wild cards, but something like
>
> fnlist = system("ls *.csv")
> n = words(fnlist)
> fname = word(fnlist,i)
> plot for [i=1:n] fname(i) using ....
>
> could work.
Or
fnlist = system("ls -1 *.csv")
plot for [FILE in fnlist] FILE
[toc] | [prev] | [next] | [standalone]
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2016-06-08 10:34 +0200 |
| Message-ID | <nj8laa$jih$1@solani.org> |
| In reply to | #3335 |
Am 08.06.2016 um 06:49 schrieb Ethan A Merritt:
> Karl Ratzsch wrote:
>> Am 07.06.2016 um 21:22 schrieb explorat123@gmail.com:
>>> I'd like to plot multiple .csv files in bulk, regardless of their
>>> names: 20151221-Log.csv
>>> 20160315-Log.csv
>>> 20160601-Log.csv
>>> ...
>>> Is there an easy way to do this without having to specify the name
>>> for each individual file and without having to join the files ?
>>
>> "plot" obviously does not support wild cards, but something like
>>
>> fnlist = system("ls *.csv")
>> n = words(fnlist)
>> fname = word(fnlist,i)
>> plot for [i=1:n] fname(i) using ....
>>
>> could work.
>
> Or
> fnlist = system("ls -1 *.csv")
> plot for [FILE in fnlist] FILE
I keep forgetting that "for" can directly iterate through a list of
words. Thanks!
Also works on MS windows, btw., the corresponding command is "dir /B
*.cvs".
[toc] | [prev] | [next] | [standalone]
| From | explorat123@gmail.com |
|---|---|
| Date | 2016-06-09 13:13 -0700 |
| Message-ID | <2d31e5f8-2fcd-42f5-bfb5-dfd85807870d@googlegroups.com> |
| In reply to | #3333 |
Op dinsdag 7 juni 2016 21:22:08 UTC+2 schreef explo...@gmail.com: > Hi, > > I'd like to plot multiple .csv files in bulk, regardless of their names: > 20151221-Log.csv > 20160315-Log.csv > 20160601-Log.csv > ... > > Each of them contains data in the form: > 1,18711,9501,888,0.00,2.19 > 2,18726,9501,897,0.00,2.19 > 3,18741,9501,900,0.00,2.17 > ... > > > Is there an easy way to do this without having to specify the name for each individual file and without having to join the files ? > > Something like using a wildcard in DOS: > plot '*-Log.csv' u 1:2 , '' u 1:3 > or even: > plot '*.csv' u 1:2 , '' u 1:3 > > Thanks Thank you for your quick replies. Unfortunately this doesn't work for me ... (I use gnuplot 5.0.3 wih Win XP)
[toc] | [prev] | [next] | [standalone]
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2016-06-10 01:54 +0200 |
| Message-ID | <njcvja$b5t$1@solani.org> |
| In reply to | #3337 |
Am 09.06.2016 um 22:13 schrieb explorat123@gmail.com:
> Op dinsdag 7 juni 2016 21:22:08 UTC+2 schreef explo...@gmail.com:
>> I'd like to plot multiple .csv files in bulk, regardless of their names:
>> 20151221-Log.csv
>> 20160315-Log.csv
>> 20160601-Log.csv
>> ...
> Thank you for your quick replies.
> Unfortunately this doesn't work for me ...
> (I use gnuplot 5.0.3 wih Win XP)
>
Doesn't
print system("dir /B *.csv")
give the expected output any more? Win XP is sort of not supported
any more, but i guessed it still works mostly ...
[toc] | [prev] | [next] | [standalone]
| From | explorat123@gmail.com |
|---|---|
| Date | 2016-06-13 00:16 -0700 |
| Message-ID | <b7cdd2a6-4e44-4dbc-ba3f-f18802a0240a@googlegroups.com> |
| In reply to | #3333 |
Op dinsdag 7 juni 2016 21:22:08 UTC+2 schreef explo...@gmail.com:
> Hi,
>
> I'd like to plot multiple .csv files in bulk, regardless of their names:
> 20151221-Log.csv
> 20160315-Log.csv
> 20160601-Log.csv
> ...
>
> Each of them contains data in the form:
> 1,18711,9501,888,0.00,2.19
> 2,18726,9501,897,0.00,2.19
> 3,18741,9501,900,0.00,2.17
> ...
>
>
> Is there an easy way to do this without having to specify the name for each individual file and without having to join the files ?
>
> Something like using a wildcard in DOS:
> plot '*-Log.csv' u 1:2 , '' u 1:3
> or even:
> plot '*.csv' u 1:2 , '' u 1:3
>
> Thanks
Hi,
Finally got it working, thanks for your help.
But there's something I still don't understand:
print system("dir /B *.csv") works fine, but
print system("dir C:\temp1 /B *.csv") does not what's expected.
What am I doeing wrong ?
[toc] | [prev] | [next] | [standalone]
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2016-06-13 09:26 +0200 |
| Message-ID | <njln76$uu5$1@solani.org> |
| In reply to | #3341 |
Am 13.06.2016 um 09:16 schrieb explorat123@gmail.com:
>
> Finally got it working, thanks for your help.
>
> But there's something I still don't understand:
> print system("dir /B *.csv") works fine, but
> print system("dir C:\temp1 /B *.csv") does not what's expected.
>
> What am I doeing wrong ?
>
It's
dir /B C:\temp1\*.csv
and you have to give double backslashes inside double quotes.
See "help quote marks".
[toc] | [prev] | [next] | [standalone]
| From | explorat123@gmail.com |
|---|---|
| Date | 2016-06-17 03:39 -0700 |
| Message-ID | <d8d4dca8-419e-49e6-b80a-d890b8fcc4a3@googlegroups.com> |
| In reply to | #3333 |
Op dinsdag 7 juni 2016 21:22:08 UTC+2 schreef explo...@gmail.com: > Hi, > > I'd like to plot multiple .csv files in bulk, regardless of their names: > 20151221-Log.csv > 20160315-Log.csv > 20160601-Log.csv > ... > > Each of them contains data in the form: > 1,18711,9501,888,0.00,2.19 > 2,18726,9501,897,0.00,2.19 > 3,18741,9501,900,0.00,2.17 > ... > > > Is there an easy way to do this without having to specify the name for each individual file and without having to join the files ? > > Something like using a wildcard in DOS: > plot '*-Log.csv' u 1:2 , '' u 1:3 > or even: > plot '*.csv' u 1:2 , '' u 1:3 > > Thanks Yes, this works ! Thank you very much !
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web