Gnuplot x11 Resistance - Aspect ratio does not stay constant when window is resized

I am having problems with aspect ratio using gnuplot on x11 terminal. I've tried the 'set size ratio -1' and 'set size square' commands. Everything works well until the window is resized. The aspect ratio of the graph is not preserved unless the window is stretched in both directions in equal proportions.

I would like to maximize the x11 window while keeping the square aspect ratio for the graph. Is it possible?

Also, I am using gnuplot version 4.6.5

EDIT # 1:

Also it should be noted that im calling gnuplot from a C ++ script. let's say I have an ascii file containing all of the gnuplot commands called plotCOMMANDS. in my C ++ script, I have the following system command to call gnuplot:gnuplot -persist plotCOMMANDS

If I were drawing in gnuplot terminal, I could use the command replot

(as suggested by Christoph). but is there a way to run a command replot

in a C ++ script every time the window is resized?

+3


source to share


1 answer


I think the window content is not automatically updated after maximizing it, but the existing graph is only rescaled to the new window size (terminal has windows

the same problem).



You must type replot

in the interactive terminal after maximizing the window. This works great for terminals x11

and windows

. Hotkey e

doesn't work for x11

. BTW: In the next version 5.0 this behavior is fixed and the window is automatically replaced when the canvas is resized.

+2


source







All Articles