vier Versuche
This commit is contained in:
17
gnuplot/versuch01.gp
Normal file
17
gnuplot/versuch01.gp
Normal file
@@ -0,0 +1,17 @@
|
||||
set xzeroaxis
|
||||
set yzeroaxis
|
||||
set border 0 # remove frame
|
||||
set xtics axis # place tics on axis rather than on border
|
||||
set ytics axis
|
||||
set ticscale 0 # [optional] labels only, no tics
|
||||
set xtics add ("" 0) # suppress origin label that lies on top of axis
|
||||
set ytics add ("" 0) # suppress origin label that lies on top of axis
|
||||
#
|
||||
# if arrows are wanted only in the positive direction
|
||||
set arrow 1 from 0,0 to graph 1, first 0 filled head
|
||||
set arrow 2 from 0,0 to first 0, graph 1 filled head
|
||||
#
|
||||
# if arrows in both directions from the origin are wanted
|
||||
set arrow 3 from 0,0 to graph 0, first 0 filled head
|
||||
set arrow 4 from 0,0 to first 0, graph 0 filled head
|
||||
plot x^2
|
||||
18
gnuplot/versuch02.gp
Normal file
18
gnuplot/versuch02.gp
Normal file
@@ -0,0 +1,18 @@
|
||||
et xzeroaxis
|
||||
set yzeroaxis
|
||||
set border 0 # remove frame
|
||||
set xtics axis # place tics on axis rather than on border
|
||||
set ytics axis
|
||||
set ticscale 0 # [optional] labels only, no tics
|
||||
set xtics add ("" 0) # suppress origin label that lies on top of axis
|
||||
set ytics add ("" 0) # suppress origin label that lies on top of axis
|
||||
#
|
||||
# if arrows are wanted only in the positive direction
|
||||
set arrow 1 from 0,0 to graph 1, first 0 filled head
|
||||
set arrow 2 from 0,0 to first 0, graph 1 filled head
|
||||
#
|
||||
# if arrows in both directions from the origin are wanted
|
||||
set arrow 3 from 0,0 to graph 0, first 0 filled head
|
||||
set arrow 4 from 0,0 to first 0, graph 0 filled head
|
||||
|
||||
plot f(x)
|
||||
62
gnuplot/versuch03.gp
Normal file
62
gnuplot/versuch03.gp
Normal file
@@ -0,0 +1,62 @@
|
||||
#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
|
||||
15
gnuplot/versuch04.gp
Normal file
15
gnuplot/versuch04.gp
Normal file
@@ -0,0 +1,15 @@
|
||||
set xzeroaxis
|
||||
set xtics axis
|
||||
set xrange [-10:10]
|
||||
set arrow 1 from -9,0 to -10,0
|
||||
set arrow 2 from 9,0 to 10,0
|
||||
|
||||
set yzeroaxis
|
||||
set ytics axis
|
||||
set yrange [-1:1]
|
||||
set arrow 3 from 0,-.9 to 0,-1
|
||||
set arrow 4 from 0,.9 to 0,1
|
||||
|
||||
set border 0
|
||||
|
||||
plot sin(x)
|
||||
Reference in New Issue
Block a user