Files
mathegrafiken/gnuplot/versuch03.gp
Sven Riwoldt bebdddd599 vier Versuche
2024-02-14 20:09:14 +01:00

62 lines
1.1 KiB
Gnuplot

#set term pngcairo truecolor size 300,300 font "Arial,12"
set out 'plot.png'
#https://stackoverflow.com/questions/12749661/how-to-move-axes-to-center-of-chart
# x,y min/max and center
xmin = -2
xc = 0
xmax = 2
ymin = -0.5
yc = 0
ymax = 2
# default borders
tm = 1
bm = 1
rm = 4
lm = 4
# arrow scale factor to cover last tic
af = 1.05
set arrow from xc,yc to xmin*af,yc filled size 0.1,0.2.
set arrow from xc,yc to xmax*af,yc filled size 0.1,0.2
set arrow from xc,yc to xc,ymax*af filled size 0.1,0.2
set arrow from xc,yc to xc,ymin*af filled size 0.1,0.2
set multiplot layout 2,2
## Plot 1, top left
set key top left
set xr [xmin:xc]
set yr [yc:ymax]
set tmargin tm
set bmargin 0
set rmargin 0
set lmargin lm
set border 9
unset ytics
set xtics nomirror
plot x*x
## Plot 2, top right
unset key
set xr [xc:xmax]
set lmargin 0
set rmargin rm
set border 3
set ytics nomirror
replot
## Plot 3, bottom left
set xr [xmin:xc]
set yr [ymin:yc]
set bmargin bm
set tmargin 0
set lmargin lm
set rmargin 0
set border 12
unset tics
replot
## Plot 4, bottom right
set xr [xc:xmax]
set lmargin 0
set rmargin rm
set border 6
set ytics nomirror
replot
unset multiplot