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

Squeezed Y direction output from multiplot

38 views
Skip to first unread message

Shahid Maqbool

unread,
Jun 16, 2022, 10:04:37 AM6/16/22
to
Dear all,

I am using this example to understand multiple plots on the same output. The souce site is:
http://gnuplot.sourceforge.net/demo_5.4/layout.html

The commands I am using are these

set multiplot layout 2,2 title "Multiplot layout" font ",14"
set xtics rotate
#
set title "Plot 1"
unset key
plot sin(x)/x
#
set title "Plot 2"
unset key
plot 'silver.dat' using 1:2 ti 'silver.dat'
#
set title "Plot 3"
unset key
plot sin(x)/x
#
set title "Plot 4"
unset key
plot 'silver.dat' using 1:2 ti 'silver.dat'
#
unset multiplot

The output is a bit squeezed in the y direction. Can anyone explain how to correct it? I want uniform x and y dimensions, a square domain is desirable, precisely. Thanks in advance!

Regards
Shahid

qrk

unread,
Jun 16, 2022, 9:46:34 PM6/16/22
to
Set the output size to change aspect ratio.
Example:
set term qt 0 size 600,800

Jörg Buchholz

unread,
Jun 17, 2022, 3:08:49 AM6/17/22
to
On 16.06.2022 16:04, Shahid Maqbool wrote:
> Dear all,
>
> I am using this example to understand multiple plots on the same
> output. The souce site is:
> http://gnuplot.sourceforge.net/demo_5.4/layout.html
>
>
> The output is a bit squeezed in the y direction. Can anyone explain
> how to correct it? I want uniform x and y dimensions, a square domain
> is desirable, precisely. Thanks in advance!
>
> Regards Shahid

If you want to have the same dimension of the graphs you must set the
margins. Example:

set margins 10,10,1,1
set multiplot layout 2,1
plot sin(x)
plot sin(x)+100
unset multiplot

Jörg

Shahid Maqbool

unread,
Jun 17, 2022, 12:41:26 PM6/17/22
to
It is still not working for the 2,2 multiplot, especially with the titles turned on.

Shahid

Jörg Buchholz

unread,
Jun 22, 2022, 1:51:52 AM6/22/22
to
With this example you get a 2*2 layout. One plot has a title with two
lines, one has no title and the other have titles with one line.
All have the same x and y dimension.

unset title
set margins 10,2,2,4
set ytics format "%.1f"
set multiplot
set size 0.5,0.5
set origin 0,0
plot sin(x)
set origin 0,0.5
set title "Plot\nTest"
plot sin(x)+100
set origin 0.5,0
set title "Plot"
plot sin(x)
set origin 0.5,0.5
set title "Plot"
0 new messages