On Tue, 5 Dec 2017, Artur Tarassow wrote:
Dear all,
I would like to change the resolution of a graph. See the following example
<hansl>
open denmark.gdt -q
list lplot = LRM LRY
P1 <- plot lplot
options with-lines time-series
literal set terminal pngcairo size 720,320 enhanced font 'Verdana,12'
end plot --output="display"
</hansl>
which doesn't adapt the resolution accordingly. However, doing the following
steps creates the correctly sized figure:
1) right click on object P1 in the icon view --> Edit plot commands
2) Add the following to line 14: set terminal pngcairo size 720,320 enhanced
font 'Verdana,12'
3) Save (Cmd+s) and run (Cmd+r) within the window, and close the window.
4) re-open P1
Is there a reason why setting the resolution is not allowed? I am surprised
to see that the "set terminal ..." line does not appear in the written
gnuplot-script even though it's within the plot-block.
We filter out any "set terminal ..." lines in a plot because these
are liable to mess things up royally when gretl tries to display a
plot, or create a big mess if the terminal is set to a binary format
such as PNG without a suitable "set output" line (binary spew into a
terminal window or into the ether).
To get full control over gnuplot "term" (and output filename):
1 display the plot
2 save as icon
3 edit plot commands
4 save the plot commands to a file
5 edit the file as you wish
(I guess 4 and 5 could be reversed)
Then run gnuplot on the saved file to generate whatever kind of plot
you like.
When a plot is displayed by gretl itself, we need to have control
over the sizing so we're sure to be able to add our menus, size the
window correctly, and offer rescaling of the plot that will work
(the "bigger" and "smaller" buttons).
Allin