You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(2) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(3) |
Feb
(1) |
Mar
(2) |
Apr
(22) |
May
(52) |
Jun
(43) |
Jul
(36) |
Aug
(59) |
Sep
(37) |
Oct
(55) |
Nov
(39) |
Dec
(36) |
| 2005 |
Jan
(64) |
Feb
(40) |
Mar
(62) |
Apr
(58) |
May
(256) |
Jun
(77) |
Jul
(80) |
Aug
(39) |
Sep
(56) |
Oct
(36) |
Nov
(113) |
Dec
(68) |
| 2006 |
Jan
(43) |
Feb
(64) |
Mar
(69) |
Apr
(60) |
May
(71) |
Jun
(53) |
Jul
(63) |
Aug
(63) |
Sep
(76) |
Oct
(85) |
Nov
(82) |
Dec
(73) |
| 2007 |
Jan
(75) |
Feb
(82) |
Mar
(84) |
Apr
(104) |
May
(67) |
Jun
(101) |
Jul
(107) |
Aug
(138) |
Sep
(128) |
Oct
(106) |
Nov
(112) |
Dec
(112) |
| 2008 |
Jan
(94) |
Feb
(87) |
Mar
(146) |
Apr
(169) |
May
(75) |
Jun
(26) |
Jul
(26) |
Aug
(7) |
Sep
(18) |
Oct
(53) |
Nov
(42) |
Dec
(19) |
| 2009 |
Jan
(43) |
Feb
(39) |
Mar
(18) |
Apr
(45) |
May
(66) |
Jun
(87) |
Jul
(56) |
Aug
(41) |
Sep
(56) |
Oct
(139) |
Nov
(98) |
Dec
(88) |
| 2010 |
Jan
(81) |
Feb
(79) |
Mar
(83) |
Apr
(97) |
May
(124) |
Jun
(84) |
Jul
(53) |
Aug
(85) |
Sep
(89) |
Oct
(50) |
Nov
(98) |
Dec
(78) |
| 2011 |
Jan
(97) |
Feb
(74) |
Mar
(68) |
Apr
(54) |
May
(63) |
Jun
(59) |
Jul
(65) |
Aug
(58) |
Sep
(37) |
Oct
(40) |
Nov
(59) |
Dec
(35) |
| 2012 |
Jan
(16) |
Feb
(56) |
Mar
(63) |
Apr
(25) |
May
(48) |
Jun
(58) |
Jul
(20) |
Aug
(13) |
Sep
(43) |
Oct
(35) |
Nov
(20) |
Dec
(17) |
| 2013 |
Jan
(22) |
Feb
(11) |
Mar
(51) |
Apr
(34) |
May
(57) |
Jun
(27) |
Jul
(70) |
Aug
(30) |
Sep
(38) |
Oct
(53) |
Nov
(40) |
Dec
(25) |
| 2014 |
Jan
(26) |
Feb
(35) |
Mar
(60) |
Apr
(12) |
May
(17) |
Jun
(15) |
Jul
(9) |
Aug
(18) |
Sep
(46) |
Oct
(18) |
Nov
(19) |
Dec
(15) |
| 2015 |
Jan
(17) |
Feb
(28) |
Mar
(21) |
Apr
(54) |
May
(36) |
Jun
(8) |
Jul
(30) |
Aug
(13) |
Sep
(3) |
Oct
(28) |
Nov
(3) |
Dec
(3) |
| 2016 |
Jan
(11) |
Feb
(9) |
Mar
(29) |
Apr
(10) |
May
(8) |
Jun
(5) |
Jul
(50) |
Aug
(57) |
Sep
(13) |
Oct
(5) |
Nov
(17) |
Dec
(11) |
| 2017 |
Jan
(3) |
Feb
(23) |
Mar
(16) |
Apr
(7) |
May
(15) |
Jun
(12) |
Jul
(48) |
Aug
(15) |
Sep
(3) |
Oct
(20) |
Nov
(28) |
Dec
(21) |
| 2018 |
Jan
(13) |
Feb
(21) |
Mar
(21) |
Apr
(7) |
May
(3) |
Jun
(7) |
Jul
(27) |
Aug
(38) |
Sep
(4) |
Oct
(30) |
Nov
(22) |
Dec
|
| 2019 |
Jan
(5) |
Feb
(16) |
Mar
(1) |
Apr
(9) |
May
(7) |
Jun
(20) |
Jul
(13) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(2) |
Dec
(4) |
| 2020 |
Jan
(6) |
Feb
(11) |
Mar
(1) |
Apr
(18) |
May
(4) |
Jun
(5) |
Jul
(12) |
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
(1) |
Dec
(17) |
| 2021 |
Jan
(1) |
Feb
(11) |
Mar
(16) |
Apr
(6) |
May
(5) |
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
(8) |
Oct
(10) |
Nov
(4) |
Dec
(4) |
| 2022 |
Jan
(9) |
Feb
(35) |
Mar
(4) |
Apr
|
May
(3) |
Jun
(49) |
Jul
(11) |
Aug
|
Sep
(5) |
Oct
(2) |
Nov
(16) |
Dec
(13) |
| 2023 |
Jan
|
Feb
(8) |
Mar
(3) |
Apr
|
May
(8) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
| 2024 |
Jan
(6) |
Feb
(9) |
Mar
|
Apr
(26) |
May
(24) |
Jun
|
Jul
(4) |
Aug
(2) |
Sep
(1) |
Oct
(10) |
Nov
(9) |
Dec
|
| 2025 |
Jan
|
Feb
(22) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(4) |
| 2026 |
Jan
|
Feb
(24) |
Mar
(20) |
Apr
(18) |
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: anyy z. <zs...@ya...> - 2017-08-08 17:45:04
|
Hello, I want to overlay a line with pm3d. I have searched a lot in this forum and I can overlay the line over the surface plot. However, I also want the line to appear at the bottom so that it can clearly show the path. Could anyone help with that? Thanks a lot. Shijun Zhao |
|
From: theozh <th...@gm...> - 2017-08-08 06:54:45
|
Hi Iva,
thank you very much for your multi-OS, all-inclusive code...
Well, the codes get's pretty lengthy and complicated in order to check
all sorts of things. This probably can't be avoided.
I'm sure with some testing and maybe some modifications your code will
work and will give the desired result :-).
>> It looks like a threefold nested "for loop" is also possible. But how to
>> move on to the next multiplot and place "label 1 Data_<Index1>"
>> in every plot?
>
> I'm not sure what would like to code. Could you give an example?
>
Well, as I said: I have data files with a clear file name structure, namely
"Data_<Index1>_<Index2>_<Index3>.dat"
The goal is to decide depending on the filename where to plot the data
in a multiplot and how to color it. Sounds like a rather simple task...
I currently see basically two options:
A) put all exisiting files into a list and depending on the filename
distribute it into the corresponding plot. However, deciding based on
the filename in which graph to plot the data, would probably require
some kind of "Regular Expressions" within gnuplot which I do not see how
to realize.
B) loop all possible filenames in a threefold plot loop within a certain
maximum range. Depending on how large the <Index> ranges are you might
get lengthy list of error messages (but, ok, who cares?). However, with
a threefold plot loop I don't (yet) see a way to distribute the data
into the corresponding multiplots.
Since I do not see a solution for A) and for B) is probably has to be a
mix of both. Or as your code is... three loops with a few if {} cases
and helper variables...
I just thought, I overlooked a very simple, short and efficient method.
Seems not to be the case. Thank you for your help!
|
|
From: ivana r. <iva...@mf...> - 2017-08-05 14:38:55
|
Hi Theo,
> 1. The multiplot will not finish, e.g. when none of Data_E-files exist.
> How to cope with this?
As told before, you may use empty plots.
> It looks like a threefold nested "for loop" is also possible. But how to
> move on to the next multiplot and place "label 1 Data_<Index1>"
> in every plot?
It would be sometimes useful if "title NONE" does the same as
"notitle" and if one could alter iteration variable inside the loop.
Anyhow, there are few possible solutions. The following code shows one
of them.
### start gnuplot code
# DataFile name scheme: Data_<Index1>_<Index2>_<Index3>.dat
# Plot all <Index1> into one plot
# Plot all <Index2> with same color
#
# test a version
if ( GPVAL_VERSION < 5.2 ) {
printerror "Need at least version 5.2"
exit 1
}
# clear session, set favorite colors
reset
set colorsequence classic
# OS-dependence
___system = strstrt(GPVAL_SYSNAME, "Windows") #1: Windows; 0: others
__list = ___system ? "dir /b " : "ls "
__nowhere = ___system ? "NUL" : "/dev/null"
__silent = ' 2> '.__nowhere
# Indexes
array Index1[9] = ["A", "B", "C", "D", "E", "F", "G", "H", "I"]
array Index2[6] = ["a", "b", "c", "d", "e", "f"]
array first[|Index2|]
MinIndex3 = 1
MaxIndex3 = 3
if ( MaxIndex3 < MinIndex3 || MaxIndex3 > 9 ) {
printerror "Limits for Index3 are not set properly."
exit 2
}
# data files (at the 3rd position accepts strings and integers, both length 1)
FileName(i, j, k) = sprintf("Data_%s_%s_%.1s.dat", i, j, "".k)
# go on
set multiplot layout 3,3
set key right
#the main loop
do for [i=1:|Index1|] {
# something to plot?
# preprocessing init
NoFile = 1
# try to find sets and first files in them
do for [j=1:|Index2|] {
# list all files in the current "i-j" set
first[j] = files = system(__list.FileName(Index1[i], Index2[j], "?").__silent)
# get Index3 of the first existing file in the given range
do for [k=1:words(files)] {
flen = strlen(first[j] = word(files, k))
first[j] = first[j][flen-4:flen-4]
if ( first[j] >= MinIndex3 && first[j] <= MaxIndex3 ) {
break
} else {
first[j]=""
}
}
# proceed the result
if ( first[j] eq "" ) {
# minimize warning for empty sets
first[j] = MaxIndex3
} else {
# at least one set was found for current "i"
NoFile = 0
}
}
# preprocessing ended
# Choose what to plot
if (NoFile) {
set notics
set key title "Nothing to plot for Data_".Index1[i]
plot [0:10] [0:10] 1/0 not
} else {
set tics
set key title "Data_".Index1[i]
plot \
for [j=1:|Index2|] FileName(Index1[i], Index2[j], first[j]) \
w l lc j title sprintf("%s", Index2[j]), \
for [j=1:|Index2|] for [k=(first[j]):MaxIndex3] \
FileName(Index1[i], Index2[j], k) w l lc j not
}
}
unset multiplot
### end gnuplot code
So, the first file of set is find and plot with the title, while
remaining items are plotted without (actually the first one is also
repeated to prevent some limit trouble cases).
Another solution is, e.g., to plot real sets of files only and
determine the linecolor from the file name.
The above code was never tested on Windows, so you may need to tune
some system specific variables.
> It looks like a threefold nested "for loop" is also possible. But how to
> move on to the next multiplot and place "label 1 Data_<Index1>"
> in every plot?
I'm not sure what would like to code. Could you give an example?
Iva
|
|
From: theozh <th...@gm...> - 2017-08-04 11:30:31
|
Thank you, Ethan!
I learnt again a few things.
1. I shouldn't post code which is not fully tested
2. I wasn't yet aware of Arrays in gnuplot.
Actually, in my code it should have been a string and read Index1 = "A
B C D E F G H I"...
3. It's a good idea to create the filename via formula and sprintf()
So with your suggestions the following code looks compact and is tested
;-). Color is determined by <Index2>.
However, two issues:
1. The multiplot will not finish, e.g. when none of Data_E-files exist.
How to cope with this?
It looks like a threefold nested "for loop" is also possible. But how to
move on to the next multiplot and place "label 1 Data_<Index1>"
in every plot?
2. minor thing: Files with different <Index3> are just repeated
measurements of Data_<Index1>_<Index2> and do not need individual titles
in the key. How would it be possible to have just one per
Data_<Index1>_<Index2> per plot?
### start gnuplot code
# DataFile name scheme: Data_<Index1>_<Index2>_<Index3>.dat
# Plot all <Index1> into one plot
# Plot all <Index2> with same color
#
reset
set colorsequence classic
array Index1[9] = ["A", "B", "C", "D", "E", "F", "G", "H", "I"]
array Index2[6] = ["a", "b", "c", "d", "e", "f"]
MaxIndex3 = 3
FileName(i,j,k) = sprintf("Data_%s_%s_%d.dat",i,j,k)
set multiplot layout 3,3
do for [i=1:|Index1|] {
set label 1 sprintf("Data_%s",Index1[i]) at graph 0.05,0.9
plot for [j=1:|Index2|] for [k=1:MaxIndex3]
FileName(Index1[i],Index2[j],k) w l lc j title sprintf("%s",Index2[j])
}
unset multiplot
### end gnuplot code
|
|
From: sfeam <sf...@us...> - 2017-08-02 16:04:35
|
On Wednesday, 02 August 2017 16:46:27 theozh wrote:
> ok... maybe I simply loop all the files
> "Data_<Index1>_<Index2>_<Index3>.dat"
> with respect to the first two indices and put them all in one list per
> plot. Additionally, in parallel I need to create a color list which
> corresponds to <Index2>.
> With this gnuplot checks [A...I] (9) x [a...f] (6) =54 times whether are
> files existing. Not very elegant, but seems feasible...
>
> Regular expressions in gnuplot might be nice e.g. to create sublists or
> define the color from the filenames...
>
> ### gnuplot code
> Index1 = [A B C D E F G H I]
> Index2 = [a b c d e f]
> ColorList = ""
> AllFileList = ""
>
> set multiplot layout 3,3
> do for [iii = 1:words(Index1)] {
> do for [jjj = 1:words(Index2)] {
> FileList = system('dir /B /S Data_'.Index1.'_'.Index2.'_'*.dat')
> do for [kkk = 1:words(FileList)] { ColorList = ColorList." ".jjj }
> AllFileList = AllFileList." ".FileList
> }
You are either inventing syntax that doesn't exist or mangling syntax
that does exist. I think your intent is something like
array index1 = ["A", "B", "C", "D", "E", "F", "G", "H", "I"]
file(i,j) = sprintf("%s_%d.dat", index1[i], j)
do for [iii = 1:|index1|] for [jjj = 1:*] {
plot file(i,j) with ... lc variable
}
I left out the color because it wasn't clear to me where it comes from,
but it sounds like you want to use it as a variable to color the lines
rather than as an element to loop over. So that would be something
involving "lc variable"
> unset multiplot
> ### end gnuplot code
> ### Still needs to be tested when several files are not existing.
missing files should not be a problem except that the iteration
[jjj = 1:*] will terminate at the first missing file. So if there are gaps
in the numbering you must give an explicit upper bound rather than *.
See for instance the second plot in
http://gnuplot.sourceforge.net/demo_cvs/iterate.html
At least that's the intent. If you find otherwise please report it as a bug.
Ethan
|
|
From: Dave H. <da...@ho...> - 2017-08-02 15:24:09
|
On Wed, 2 Aug 2017, thse wrote:
> multiple for-loops are possible:
>
> gnuplot> help for
> ...
> ...
> Nested iteration is supported:
>
> set for [i=1:9] for [j=1:9] label i*10+j sprintf("%d",i*10+j) at i,j
> ...
>
> i.e.,
> plot for [i=1:5] for [j=1:5] sin(i*j*x)
> will work.
Well, if I could print that out in A0 it would make a surreal picture on
my wall...
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."
|
|
From: theozh <th...@gm...> - 2017-08-02 14:46:38
|
ok... maybe I simply loop all the files
"Data_<Index1>_<Index2>_<Index3>.dat"
with respect to the first two indices and put them all in one list per
plot. Additionally, in parallel I need to create a color list which
corresponds to <Index2>.
With this gnuplot checks [A...I] (9) x [a...f] (6) =54 times whether are
files existing. Not very elegant, but seems feasible...
Regular expressions in gnuplot might be nice e.g. to create sublists or
define the color from the filenames...
### gnuplot code
Index1 = [A B C D E F G H I]
Index2 = [a b c d e f]
ColorList = ""
AllFileList = ""
set multiplot layout 3,3
do for [iii = 1:words(Index1)] {
do for [jjj = 1:words(Index2)] {
FileList = system('dir /B /S Data_'.Index1.'_'.Index2.'_'*.dat')
do for [kkk = 1:words(FileList)] { ColorList = ColorList." ".jjj }
AllFileList = AllFileList." ".FileList
}
plot for [mmm = 1:words(AllFiles)] word(AllFiles,mmm) u 1:2 w l lc
word(ColorList,mmm) notitle
}
unset multiplot
### end gnuplot code
### Still needs to be tested when several files are not existing.
|
|
From: theozh <th...@gm...> - 2017-08-02 13:10:24
|
Thank you! You're right.
Well, if you check help starting with "plot" I see a link to subtopics
"for loops in plot command". But there, nested iteration is not
mentioned. Might be helpful there to set a link to "for". Unfortunately,
I haven't checked help for "for".
However, I just noticed that in order to illustrate my problem I
simplified it too much. This nested loop will actually not (yet) solve
my problem.
Let me try to explain:
I have datafiles which are named with the following scheme:
Data_<1>_<2>_<3>
<1> is a known, limited range e.g. A,B,C,D,E,F,G,H,I
<2> is a unknown, variable range, e.g. a,b,c,d,...
<3> is a unknown, variable range, e.g. 1,2,...
What I would like to plot is in a Multiplot:
All Data_A in the first plot, Data_B in the second, etc...
where a,b,c,... determines the color of the line
and 1,2,... are just data from repeated measurements.
The difficulty is that not files for all combinations, e.g. A_a_1, ...
I_d_9 might exist.
I get the existing filenames via one or several system calls, e.g.
FileList = system("dir /B /S Data_A_*.dat")
or
FileList = system("dir /B /S Data_A_a_*.dat")
I currently do not see how to loop this for each plot of the multiplot.
|
|
From: thse <t.s...@fz...> - 2017-08-02 12:14:14
|
multiple for-loops are possible:
gnuplot> help for
...
...
Nested iteration is supported:
set for [i=1:9] for [j=1:9] label i*10+j sprintf("%d",i*10+j) at i,j
...
i.e.,
plot for [i=1:5] for [j=1:5] sin(i*j*x)
will work.
--
View this message in context: http://gnuplot.10905.n7.nabble.com/How-to-realize-a-single-plot-in-a-double-loop-tp20830p20831.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: theozh <th...@gm...> - 2017-08-02 09:28:31
|
Hello,
I am trying to plot with a "double loop" into one single plot.
For example something like:
plot for [i=1:5][j=1:5] sin(i*j*x) w l
But a 2D loop apparently does not exist in gnuplot?!
First trial:
set label 1 "This is a double loop"
do for [i=1:5] {
plot for [j=1:5] sin(i*j*x)
}
This basically works, however, the axis and labels are printed several
times on top of each other such that the output (axis and labels) look
blurry or pixelated.
Second trial:
Same thing if I use multiplot.
set multiplot layout 1,1
do for [i=1:5] {
plot for [j=1:5] sin(i*j*x)
set multiplot previous
}
unset multiplot
Third trial:
Unsetting border, label, tics, ... after the first plot
unset border
unset label
unset xtics
However, this changes the following plot sizes...
Any ideas how to circumvent that several identical axis and labels are
plotted on top of each other and start looking blurry/pixelated?
|
|
From: Tatsuro M. <tma...@ya...> - 2017-07-31 00:11:28
|
----- Original Message -----
> The code for wgnuplot.exe is fixed by Bastian in the current development version
> (5.3).
>
> flist=system("dir /B *.dat")
>
> under the folder where *.dat does not exist works.
>
> The fix will be applied to 5.2 and 5.0 in the near future after the test
> on the development version.
>
The 5.2-rc3 has just released including windows binary packages where the change is applied.
https://sourceforge.net/projects/gnuplot/files/gnuplot/5.2%20release%20candidates/
Tatsuro
|
|
From: Tatsuro M. <tma...@ya...> - 2017-07-29 23:08:24
|
> With this it works in all three options
> - gnuplot.exe
> - wgnuplot_pipes.exe
> - wgnuplot.exe
The code for wgnuplot.exe is fixed by Bastian in the current development version (5.3).
flist=system("dir /B *.dat")
under the folder where *.dat does not exist works.
The fix will be applied to 5.2 and 5.0 in the near future after the test
on the development version.
The latest binary packages of the development version is available on my web.
http://www.tatsuromatsuoka.com/gnuplot/Eng/winbin/
Tatsuro
|
|
From: theozh <th...@gm...> - 2017-07-29 12:57:35
|
Thanks, Tatsuro and Bastian! With this it works in all three options - gnuplot.exe - wgnuplot_pipes.exe - wgnuplot.exe |
|
From: Tatsuro M. <tma...@ya...> - 2017-07-29 07:44:52
|
----- Original Message ----- > From: theozh <th...@gm...> > To: Tatsuro MATSUOKA <tma...@ya...>; gnu...@li... > Cc: > Date: 2017/7/28, Fri 18:33 > Subject: Re: [Gnuplot-info] How to ignore "popen failed"? > >> What happens you execute the script on wgnuplot_pipes.exe? >> > Thanks, Tatsuro, for that hint. Haven't tried so far. > Well, then it also seems to work :-). > So, problem solved...?! > Bastian relied in the bug ticket https://sourceforge.net/p/gnuplot/bugs/1950/ ************************************************************* This is a bug or shortcoming of the "fake" pipe emulation. If the command interpreter cannot execute a command, it returns 1. Currently gnuplot interprets this return value as such and fails. Of course 1 can also be a valid return code by a (more-or-less) successful command, which is the case here. A simple work-around (on wgnuplot.exe) is to force a return value of zero: flist=system('cmd /c "dir /B *.dat & exit 0"') ************************************************************* Tatsuro |
|
From: Tatsuro M. <tma...@ya...> - 2017-07-28 09:58:07
|
> I have post a mail before seeing your reply. > OK. I will open bug ticket. > > Tatsuro I have open a bug ticket https://sourceforge.net/p/gnuplot/bugs/1950/ Tatsuro |
|
From: Tatsuro M. <tma...@ya...> - 2017-07-28 09:46:30
|
>> ----- Original Message ----- >>> From: theozh >>> To: gnuplot-info >>> Cc: >>> Date: 2017/7/28, Fri 04:42 >>> Subject: Re: [Gnuplot-info] How to ignore "popen failed"? >>> >>> Hi Iva, >>> thank you for this observation. >>> Yes, I typically start my scripts under wgnuplot.exe, where the > original >>> code terminates when no file is found. >>> If I start the same code under the gnuplot.exe terminal it works fine! >>> >>> Maybe somebody can explain why there is this difference and maybe >>> whether or how it's possible to make it behave the same under >> wgnuplot.exe? >>> >>> So, for the time being, no need for extra software like awk, cygwin, >>> Perl, wrapper-Script, ... >>> Thanks, Theo. >>> >> >> What happens you execute the script on wgnuplot_pipes.exe? >> >> Tatsuro >> >> > In windows binary distribution, there is a file named README-Windows.txt > There described > > * wgnuplot.exe: GUI version and the default gnuplot executable. As of version 5 > > it emulates pipe functionality. > > * wgnuplot_pipes.exe: Variant with full pipe functionality at the expense of > an additional console window. > > * gnuplot.exe: Text (console) mode version of the gnuplot executable with full > pipe functionality as it is common on other platforms. In contrast to > wgnuplot.exe, this program can also accept commands on stdin (standard input) > and print messages on stdout (standard output). It replaces pgnuplot.exe and > is recommended to be used with 3rd party applications using gnuplot as graph > engine, like e.g. Octave (www.octave.org). > > Perhaps what you met is side effect? of pipe emulation. > > I have tried > > flist=system ("dir /B *.dat") > in the folder where no *.dat on wgnuplot_pipes.exe > A message 'File not found' appears in the additional console and > "popen failed" does not appear. > I have tried on wgnuplot_pipes.exe > > I think that workaround at present is to use wgnuplot_pipes. > > BTW, please open a bug ticket on > https://sourceforge.net/p/gnuplot/bugs/ > > This topic should be discussed there but not gnuplot-info list in my opinion. > > Tatsuro > Thanks, Tatsuro, for that hint. Haven't tried so far. > Well, then it also seems to work :-). > So, problem solved...?! I have post a mail before seeing your reply. OK. I will open bug ticket. Tatsuro |
|
From: Tatsuro M. <tma...@ya...> - 2017-07-28 09:42:10
|
----- Original Message ----- > From: Tatsuro MATSUOKA <tma...@ya...> > To: theozh <th...@gm...>; gnu...@li... > Cc: > Date: 2017/7/28, Fri 16:38 > Subject: Re: [Gnuplot-info] How to ignore "popen failed"? > > > > > > ----- Original Message ----- >> From: theozh >> To: gnuplot-info >> Cc: >> Date: 2017/7/28, Fri 04:42 >> Subject: Re: [Gnuplot-info] How to ignore "popen failed"? >> >> Hi Iva, >> thank you for this observation. >> Yes, I typically start my scripts under wgnuplot.exe, where the original >> code terminates when no file is found. >> If I start the same code under the gnuplot.exe terminal it works fine! >> >> Maybe somebody can explain why there is this difference and maybe >> whether or how it's possible to make it behave the same under > wgnuplot.exe? >> >> So, for the time being, no need for extra software like awk, cygwin, >> Perl, wrapper-Script, ... >> Thanks, Theo. >> > > What happens you execute the script on wgnuplot_pipes.exe? > > Tatsuro > > In windows binary distribution, there is a file named README-Windows.txt There described * wgnuplot.exe: GUI version and the default gnuplot executable. As of version 5 it emulates pipe functionality. * wgnuplot_pipes.exe: Variant with full pipe functionality at the expense of an additional console window. * gnuplot.exe: Text (console) mode version of the gnuplot executable with full pipe functionality as it is common on other platforms. In contrast to wgnuplot.exe, this program can also accept commands on stdin (standard input) and print messages on stdout (standard output). It replaces pgnuplot.exe and is recommended to be used with 3rd party applications using gnuplot as graph engine, like e.g. Octave (www.octave.org). Perhaps what you met is side effect? of pipe emulation. I have tried flist=system ("dir /B *.dat") in the folder where no *.dat on wgnuplot_pipes.exe A message 'File not found' appears in the additional console and "popen failed" does not appear. I have tried on wgnuplot_pipes.exe I think that workaround at present is to use wgnuplot_pipes. BTW, please open a bug ticket on https://sourceforge.net/p/gnuplot/bugs/ This topic should be discussed there but not gnuplot-info list in my opinion. Tatsuro Tatsuro |
|
From: theozh <th...@gm...> - 2017-07-28 09:33:47
|
> What happens you execute the script on wgnuplot_pipes.exe? > Thanks, Tatsuro, for that hint. Haven't tried so far. Well, then it also seems to work :-). So, problem solved...?! |
|
From: Tatsuro M. <tma...@ya...> - 2017-07-28 07:38:21
|
----- Original Message ----- > From: theozh > To: gnuplot-info > Cc: > Date: 2017/7/28, Fri 04:42 > Subject: Re: [Gnuplot-info] How to ignore "popen failed"? > > Hi Iva, > thank you for this observation. > Yes, I typically start my scripts under wgnuplot.exe, where the original > code terminates when no file is found. > If I start the same code under the gnuplot.exe terminal it works fine! > > Maybe somebody can explain why there is this difference and maybe > whether or how it's possible to make it behave the same under wgnuplot.exe? > > So, for the time being, no need for extra software like awk, cygwin, > Perl, wrapper-Script, ... > Thanks, Theo. > What happens you execute the script on wgnuplot_pipes.exe? Tatsuro |
|
From: Ethan M. <eam...@gm...> - 2017-07-27 23:08:37
|
On Thu, Jul 27, 2017 at 3:38 PM, Dave Horsfall <da...@ho...> wrote:
> On Thu, 27 Jul 2017, sfeam via gnuplot-info wrote:
>
> The issue is not the missing file per se, it's that apparently Windows
>> considers this sufficiently severe to return an error code from the "dir"
>> command. It isn't a problem on unix/linux, where "ls" will print a warning
>> message but returns success. So I imagine it would be sufficient to wrap
>> your "dir" command in a script MYDIR that always returns success even if
>> the real "dir" fails:
>>
>
> Unix (FreeBSD):
>
> aneurin% ls fred
> ls: fred: No such file or directory
> aneurin% echo $?
> 1
>
>
> Linux (Debian):
>
> dave@debbie:~$ ls fred
> ls: cannot access fred: No such file or directory
> dave@debbie:~$ echo $?
> 2
>
>
> You were saying
The question is what popen() returns. Yes I was sloppy in saying "what ls
returns" rather than "what popen("ls","r") returns" but it should have been
clear from the context. Here it is with a debug printout in place:
gnuplot>
gnuplot> foo = system("ls *.c")
popen("ls *.c","r") returns 15160096
gnuplot> foo = system("ls fred")
popen("ls fred","r") returns 15169872
ls: cannot access fred: No such file or directory
man page for "popen" says
RETURN VALUE
The popen() function returns NULL if the fork(2) or pipe(2) calls
fail, or
if it cannot allocate memory.
man page for "pipe" says
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno
is set
appropriately.
Clear as mud. But operationally is evident that pipe() returns zero from
"ls fred"
> --
> Dave Horsfall DTM (VK2KFU) "Those who don't understand security will
> suffer."
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via: https://lists.sourceforge.net/
> lists/listinfo/gnuplot-info
>
|
|
From: Dave H. <da...@ho...> - 2017-07-27 22:38:36
|
On Thu, 27 Jul 2017, sfeam via gnuplot-info wrote: > The issue is not the missing file per se, it's that apparently Windows > considers this sufficiently severe to return an error code from the > "dir" command. It isn't a problem on unix/linux, where "ls" will print > a warning message but returns success. So I imagine it would be > sufficient to wrap your "dir" command in a script MYDIR that always > returns success even if the real "dir" fails: Unix (FreeBSD): aneurin% ls fred ls: fred: No such file or directory aneurin% echo $? 1 Linux (Debian): dave@debbie:~$ ls fred ls: cannot access fred: No such file or directory dave@debbie:~$ echo $? 2 You were saying? -- Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer." |
|
From: theozh <th...@gm...> - 2017-07-27 19:42:23
|
Hi Iva, thank you for this observation. Yes, I typically start my scripts under wgnuplot.exe, where the original code terminates when no file is found. If I start the same code under the gnuplot.exe terminal it works fine! Maybe somebody can explain why there is this difference and maybe whether or how it's possible to make it behave the same under wgnuplot.exe? So, for the time being, no need for extra software like awk, cygwin, Perl, wrapper-Script, ... Thanks, Theo. |
|
From: Rob S. <rob...@ut...> - 2017-07-27 19:05:12
|
Or cygwin https://www.cygwin.com On 07/27/2017 12:06 PM, BBands wrote: > This might be an auspicious moment to note that *nix utilities are > available for windows. > > https://sourceforge.net/projects/unxutils/ > > Very helpful in my opinion, > > John > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: BBands <bb...@gm...> - 2017-07-27 18:06:59
|
This might be an auspicious moment to note that *nix utilities are available for windows. https://sourceforge.net/projects/unxutils/ Very helpful in my opinion, John |
|
From: ivana r. <iva...@mf...> - 2017-07-27 16:31:29
|
Hi all, I'd like to declare I don't understand windows. So just small observation. If I unzip current non-installing version (gp52rc2-win64-mingw.zip), I get few exe-files in bin-directory. If I run gnuplot.exe under Win7Pro, it launches in terminal mode. If dir failes, error message is printed, syscall returns en empty string, and GPVAL_ERRNO is set correctly. Almost as on linux. Contrary, if I run wgnuplot.exe, a new window is created. Another window is created as well for each dir call (and !dir just blink its window, no data remains). The popen_failed is returned if dir running in the new window fails. So I guess, the problem consist in OS libraries: It would be acceptable solution to run gnuplot scripts with potentially crashing syscalls by gnuplot clones that are compiled via libraries that don't produce new windows for syscall. Sincerely Iva |