Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

In the Cartesian coordinate system, it is necessary to build 4 graphs on the 1st sheet.

54 views
Skip to first unread message

Сергей Саленко

unread,
Feb 17, 2022, 12:05:00 PM2/17/22
to
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

unread,
Feb 17, 2022, 4:28:05 PM2/17/22
to
Am 17.02.2022 um 18:04 schrieb Сергей Саленко:

> 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.

Сергей Саленко

unread,
Feb 18, 2022, 2:09:28 PM2/18/22
to
четверг, 17 февраля 2022 г. в 23:28:05 UTC+2, Hans-Bernhard Bröker:
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

Сергей Саленко

unread,
Feb 20, 2022, 3:52:59 PM2/20/22
to
пятница, 18 февраля 2022 г. в 21:09:28 UTC+2, Сергей Саленко:

Сергей Саленко

unread,
Feb 20, 2022, 3:56:41 PM2/20/22
to
воскресенье, 20 февраля 2022 г. в 22:52:59 UTC+2, Сергей Саленко:
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

unread,
Feb 24, 2022, 9:03:03 AM2/24/22
to
On Thu, 17 Feb 2022 09:04:56 -0800, Сергей Саленко wrote:

> 1. wrote a program for this, which I saved in a file test_gnu_1.txt:
> […]
> 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

Сергей Саленко

unread,
Feb 28, 2022, 4:11:05 PM2/28/22
to
четверг, 24 февраля 2022 г. в 16:03:03 UTC+2, Marc 'BlackJack' Rintsch:
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
0 new messages