Discussion:
In the Cartesian coordinate system, it is necessary to build 4 graphs on the 1st sheet.
(too old to reply)
Сергей Саленко
2022-02-17 17:04:56 UTC
Permalink
Good evening!

I am a new user gnuplot, so please help me.

Formulation of the problem.

In the Cartesian coordinate system, it is necessary to build 4 graphs on the 1st sheet.
1. I wrote a program for this, which I saved in a file test_gnu_1.txt:
set border 3
set xtics nomirror
set ytics nomirror
set xzeroaxis line type -1
set grid
plot “E:\x0x10_speed.txt” u 1:2 t “x=0” w lp pt 1 lc 1,
“” u 1:3 t “x=2” w lp pt 2 lc 2,
“” u 1:4 t “x=4” w lp pt 4 lc 3,
“” u 1:5 t “x=10” w lp pt 6 lc 4
2. In the editor NOTEPAD , save this file with the extension .gp : test_gnu _1.gp.
3. On the command line gnuplot I typed load “E:\ test_gnu _1.gp” – gnuplot gave an error message.
4. Then I did the following experiment
4.1. On the command line gnuplot I typed
plot “E:\x0x10_speed.txt” u 1:2 t “x=0” w lp pt 1 lc 1,
“” u 1:3 t “x=2” w lp pt 2 lc 2,
“” u 1:4 t “x=4” w lp pt 4 lc 3,
“” u 1:5 t “x=10” w lp pt 6 lc 4
Gnuplot drew graphs.
4.2. Left only command 4.1 in the file test_gnu _1.gp and on the command line gnuplot I typed load “E:\ test_gnu _1.gp” – gnuplot gave an error message.
Conclusion: gnuplot does not "understand" file test_gnu _1.gp.

I have 64b. computer and OS Windows 10. Gnuplot version 5.2, patchlevel 2, terminal type ‘windows’, encoding ‘cp 1251’.

Thanks in advance for your help and with the hope of understanding .
Sergey
Hans-Bernhard Bröker
2022-02-17 21:27:59 UTC
Permalink
Post by Сергей Саленко
3. On the command line gnuplot I typed load “E:\ test_gnu _1.gp” – gnuplot gave an error message.
Aha. And you seriously didn't think that it might be necessary for
people to know _what_ error message that was, to be able to help you?
Post by Сергей Саленко
4.2. Left only command 4.1 in the file test_gnu _1.gp and on the command line gnuplot I typed load “E:\ test_gnu _1.gp” – gnuplot gave an error message.
Same here.
Сергей Саленко
2022-02-18 19:09:25 UTC
Permalink
3. On the command line gnuplot I typed load “E:\ test_gnu _1.gp” – gnuplot gave an error message.
Aha. And you seriously didn't think that it might be necessary for
people to know _what_ error message that was, to be able to help you?
4.2. Left only command 4.1 in the file test_gnu _1.gp and on the command line gnuplot I typed load “E:\ test_gnu _1.gp” – gnuplot gave an error message.
Same here.
Good evening Hans-Bernhard Broker!

Thank you very much for your willingness to help me!

I will make links to the points of my message from 17.02.2022 - both in paragraph 3 and in paragraph 4.2 gnuplot gave the same error message
“invalid comand line 1”.

Best regards, Sergei
Сергей Саленко
2022-02-20 20:52:56 UTC
Permalink
Post by Сергей Саленко
3. On the command line gnuplot I typed load “E:\ test_gnu _1.gp” – gnuplot gave an error message.
Aha. And you seriously didn't think that it might be necessary for
people to know _what_ error message that was, to be able to help you?
4.2. Left only command 4.1 in the file test_gnu _1.gp and on the command line gnuplot I typed load “E:\ test_gnu _1.gp” – gnuplot gave an error message.
Same here.
Good evening Hans-Bernhard Broker!
Thank you very much for your willingness to help me!
I will make links to the points of my message from 17.02.2022 - both in paragraph 3 and in paragraph 4.2 gnuplot gave the same error message
“invalid comand line 1”.
Best regards, Sergei
Сергей Саленко
2022-02-20 20:56:39 UTC
Permalink
Post by Сергей Саленко
3. On the command line gnuplot I typed load “E:\ test_gnu _1.gp” – gnuplot gave an error message.
Aha. And you seriously didn't think that it might be necessary for
people to know _what_ error message that was, to be able to help you?
4.2. Left only command 4.1 in the file test_gnu _1.gp and on the command line gnuplot I typed load “E:\ test_gnu _1.gp” – gnuplot gave an error message.
Same here.
Good evening Hans-Bernhard Broker!
Thank you very much for your willingness to help me!
I will make links to the points of my message from 17.02.2022 - both in paragraph 3 and in paragraph 4.2 gnuplot gave the same error message
“invalid comand line 1”.
Best regards, Sergei
Good evening Hans-Bernhard Broker!

I would be very grateful if you tell me what needs to be corrected in the source code in order to eliminate the error.

Best regards, Sergei
Marc 'BlackJack' Rintsch
2022-02-24 14:02:58 UTC
Permalink
[…]
3. On the command line gnuplot I typed load “E:\ test_gnu _1.gp” –
gnuplot gave an error message.
So you say the file name is `test_gnu_1.txt` but you typed
`load “E:\ test_gnu _1.gp”` — even if we assume you didn't really type
typographical quotes and the file is actually saved on drive `E:` then
there still are two space characters that are not in the name
`test_gnu_1.txt`.

What about my assumption that you are actually using ”straight” ASCII
double quotes when typing the command(s) and in the file(s)? I.e. " and
not “ or ”‽

Ciao,
Marc 'BlackJack' Rintsch
--
“Die französische Übersetzung für »Offene Drogenszene«
heisst: »Tour de France«.” -- Gerhard Kocher
Сергей Саленко
2022-02-28 21:11:03 UTC
Permalink
Post by Marc 'BlackJack' Rintsch
[…]
3. On the command line gnuplot I typed load “E:\ test_gnu _1.gp” –
gnuplot gave an error message.
So you say the file name is `test_gnu_1.txt` but you typed
`load “E:\ test_gnu _1.gp”` — even if we assume you didn't really type
typographical quotes and the file is actually saved on drive `E:` then
there still are two space characters that are not in the name
`test_gnu_1.txt`.
What about my assumption that you are actually using ”straight” ASCII
double quotes when typing the command(s) and in the file(s)? I.e. " and
not “ or ”‽
Ciao,
Marc 'BlackJack' Rintsch
--
“Die französische Übersetzung für »Offene Drogenszene«
heisst: »Tour de France«.” -- Gerhard Kocher
Good evening Marc ‘BlackJack’ Rintsch!

First of all, thank you very much for your willingness to help me.
I followed your instructions as follows
1. In the test_gnu_1.gp file, I replaced “straight” ASC2 double quotes “ double quotes ``.
2. Now the test_gnu_1.gp file looks like this
plot 'E:\x0x10_speed.txt' u 1:2 t ``x=0`` w lp pt 1 lc 1,
```` u 1:3 t ``x=2`` w lp pt 2 lc 2,
```` u 1:4 t ``x=4`` w lp pt 4 lc 3,
```` u 1:5 t ``x=10`` w lp pt 6 lc 4
3. With the command load “E:/ test_gnu_1.gp” launched for execution.
4. Received an error message line 1: invalid command.
5. May be gnuplot "does not understand" the character encoding in the test_gnu_1.gp file - I created this file in notepad.
I will have a convincing request to you - please download the test_gnu_1.gp file on your computer. I will send the data file x0x10_speed.txt and the test_gnu_1.gp file to your email.

Thanks in advance! Sergey

Loading...