From bebdddd5993effa1f9475b7ec4d645e90130861a Mon Sep 17 00:00:00 2001 From: Sven Riwoldt Date: Wed, 14 Feb 2024 20:09:14 +0100 Subject: [PATCH] vier Versuche --- gnuplot/versuch01.gp | 17 ++++++++++++ gnuplot/versuch02.gp | 18 +++++++++++++ gnuplot/versuch03.gp | 62 ++++++++++++++++++++++++++++++++++++++++++++ gnuplot/versuch04.gp | 15 +++++++++++ 4 files changed, 112 insertions(+) create mode 100644 gnuplot/versuch01.gp create mode 100644 gnuplot/versuch02.gp create mode 100644 gnuplot/versuch03.gp create mode 100644 gnuplot/versuch04.gp diff --git a/gnuplot/versuch01.gp b/gnuplot/versuch01.gp new file mode 100644 index 0000000..a76e5a1 --- /dev/null +++ b/gnuplot/versuch01.gp @@ -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 \ No newline at end of file diff --git a/gnuplot/versuch02.gp b/gnuplot/versuch02.gp new file mode 100644 index 0000000..3cde16a --- /dev/null +++ b/gnuplot/versuch02.gp @@ -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) \ No newline at end of file diff --git a/gnuplot/versuch03.gp b/gnuplot/versuch03.gp new file mode 100644 index 0000000..2eacb80 --- /dev/null +++ b/gnuplot/versuch03.gp @@ -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 \ No newline at end of file diff --git a/gnuplot/versuch04.gp b/gnuplot/versuch04.gp new file mode 100644 index 0000000..223bbbf --- /dev/null +++ b/gnuplot/versuch04.gp @@ -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) \ No newline at end of file