Dear all,
On Windows, the installer associates *.gp files with wgnuplot.exe.
Instead of creating a plot and saving it as a (static) image I store the gnuplot commands in a *.gp file so I can easily generate the (interactive) graph by double-clicking this file. That's great for presentations.
However, sometimes I'd like to reconfigure the plot in a way that is impossible using the plot window. I'd need access to gnuplot console.
However, gnuplot 5.4.6 does not provide a means to open a console input.
According to this report, this is a regression as earlier versions of gnuplot allowed to open console by pressing space bar.
Thanks.
Daniel
I tested on Cygwin's gnuplot.
Current behaviors on WIndows seems to be consistent with those in other platforms e.g. Linux.
gnuplot allowed to open console by pressing space bar
was just happnning on old version gnuplot on Windows.
Pressing space key in the plow window raises the gnuplot console if it is open.
Ethan, am I right?
I don't know. I have always disabled that option when I build gnuplot.
OK. Thank for the reply.
In my personal use, I crick the script file by right botton and open it by suitable text editor (I recommend VS Code.) and edit and save it. And then I close the plot window and reopen plot window.
Last edit: Tatsuro MATSUOKA 2023-03-17
Dear Matsuoka-san,
Thank you for your suggestions. I use gnuplot scripts for presentation purposes. For this use case closing the plot window, opening a text editor, changing the code, and replotting is possible but defeats the purpose of scripting plots in my opinion.
Ethan Merrit mentioned a compile time option. Is the discussed behaviour (whether a console opens or can be opened when gnuplot is called from a script) a compile time option?
If this is not a regression, please close this bug and I will happily file a feature request 😁
Last edit: Daniel Dan K. 2023-03-17
Is the discussed behaviour (whether a console opens or can be opened when gnuplot is called from a script) a compile time option?
It is an option to raise command console that aleady exist by space bar and not an option to open the hidden console by space bar.
This might be workaround. I do not know that you will satisfy.
In the egnuplot prompt you can see
and the dropped script file is executed.
If your script plots something, you can tweak the plot from wgnuplot prompt.
Last edit: Tatsuro MATSUOKA 2023-03-20
Dear Matsuoka-san,
Thank you for sharing this trick.
I tried it and apparently this trick only works if I start wgnuplot.exe from the folder where the script file resides in or if I set the path manually to this folder. Otherwise gnuplot does not find the data files used in the plot command. I tried to "detect" the path of the script file using gnuplot commands but failed.
Further, plot scripts and related data files are stored together in the same directory and I create a new directory for each plot. So I'd have to close gnuplot and reopen it when switching to a plot from a different directory or I'd need to manually change the current directory to match the script's directory. That process seems rather inconvenient and stops the flow during presentation.
Thanks.
Daniel
In my trcik, the easist way to change current directory is drag folder name shown by the arrow in the attachment file and drop to wgnuplot prompt. You can easliy change directory as
Last edit: Tatsuro MATSUOKA 2023-03-21
Dear Matsuoka-san,
That works. 👍 I didn't know that I could also drag'n'drop directory paths from explorer onto the gnuplot console window to change the working directory. This workflow provides a solution for my use case and is sufficiently smooth to be used during a presentation.
Thanks.
Daniel
The complie option that Ethan mention is DISABLE_SPACE_RAISES_CONSOLE and this flag is not active on the current gnuplot on WIndows (SPACE_RAISES_CONSOLE is enable). The purpose of this flag is that pressing space key in the plow window raises the gnuplot console if it is open. My opinion is that the current behavior is expected behavior and old behavior was a bug from the consistency of bahaviors on the Linux.
Last edit: Tatsuro MATSUOKA 2023-03-17