输出 y 轴展平
Output y-axes flattened
我正在尝试重现 (第一个答案是 12 个框),但我的输出被粉碎、压平,例如,y 轴都被压平了。这是我在文本文件中的内容,然后在命令行 运行 gnuplot
### curves with different ranges & samples within one plot command
reset session
set colorsequence classic
set terminal svg enhanced
set output "para1.svg"
###set size 600, 1400
Random = "[0:1:0.001] '+' u (2*rand(0)):(2*rand(0)) w p pt 7 ps 0.5 not"
RandomFirst = "[0:1] '+' u (2*rand(0)):(2*rand(0)) w p pt 7 ps 0.5 not"
Circle = "[0:2*pi:pi/12] '+' u (cos()):(sin()) w lp pt 7 not"
CircleFirst = "[0:2*pi] '+' u (cos()):(sin()) w lp pt 7 not"
Line = "[-0.5:0.5:0.5] '+' u 1:1 w lp pt 7 lw 2 not"
LineFirst = "[-0.5:0.5] '+' u 1:1 w lp pt 7 lw 2 not"
set multiplot layout 4,3 columnsfirst
set label 1 "random/circle/line" at screen 0.166,0.99 center
unset parametric
set title "parametric OFF"
plot @RandomFirst, @Circle, @Line
set parametric
set title "parametric ON"
plot @Random, @Circle, @Line
unset parametric
set samples 1000
set title "parametric OFF"
plot @RandomFirst, @Circle, @Line
set parametric
set title "parametric ON"
plot @Random, @Circle, @Line
set label 2 "line/random/circle" at screen 0.5,0.99 center
unset parametric
set title "parametric OFF"
plot @LineFirst, @Random, @Circle
set parametric
set title "parametric ON"
plot @Line, @Random, @Circle
set samples 3
unset parametric
set title "parametric OFF"
plot @LineFirst, @Random, @Circle
set parametric
set title "parametric ON"
plot @Line, @Random, @Circle
set label 3 "circle/line/random" at screen 0.833,0.99 center
unset parametric
set title "parametric OFF"
plot @CircleFirst, @Line, @Random,
set parametric
set title "parametric ON"
plot @Circle, @Line, @Random,
set samples 24
unset parametric
set title "parametric OFF"
plot @CircleFirst, @Line, @Random,
set parametric
set title "parametric ON"
plot @Circle, @Line, @Random,
unset multiplot
### end of code
我怎样做才能获得 1:1 比率?
set size ratio 1.0
将强制绘图为正方形。
但是它们将是非常小的正方形,除非您采取措施防止标题和 top/bottom 边距占据大部分 space.
要了解其工作原理,请尝试
set tmargin 0
set bmargin 0
set title offset 0,-1
###
... rest of commands as before ...
###
然后您可以决定如何调整标题位置或如何标记各个图,这样就不需要额外的垂直 space。您还可以考虑使用 set multiplot layout
命令的 margins
关键字。
我正在尝试重现
### curves with different ranges & samples within one plot command
reset session
set colorsequence classic
set terminal svg enhanced
set output "para1.svg"
###set size 600, 1400
Random = "[0:1:0.001] '+' u (2*rand(0)):(2*rand(0)) w p pt 7 ps 0.5 not"
RandomFirst = "[0:1] '+' u (2*rand(0)):(2*rand(0)) w p pt 7 ps 0.5 not"
Circle = "[0:2*pi:pi/12] '+' u (cos()):(sin()) w lp pt 7 not"
CircleFirst = "[0:2*pi] '+' u (cos()):(sin()) w lp pt 7 not"
Line = "[-0.5:0.5:0.5] '+' u 1:1 w lp pt 7 lw 2 not"
LineFirst = "[-0.5:0.5] '+' u 1:1 w lp pt 7 lw 2 not"
set multiplot layout 4,3 columnsfirst
set label 1 "random/circle/line" at screen 0.166,0.99 center
unset parametric
set title "parametric OFF"
plot @RandomFirst, @Circle, @Line
set parametric
set title "parametric ON"
plot @Random, @Circle, @Line
unset parametric
set samples 1000
set title "parametric OFF"
plot @RandomFirst, @Circle, @Line
set parametric
set title "parametric ON"
plot @Random, @Circle, @Line
set label 2 "line/random/circle" at screen 0.5,0.99 center
unset parametric
set title "parametric OFF"
plot @LineFirst, @Random, @Circle
set parametric
set title "parametric ON"
plot @Line, @Random, @Circle
set samples 3
unset parametric
set title "parametric OFF"
plot @LineFirst, @Random, @Circle
set parametric
set title "parametric ON"
plot @Line, @Random, @Circle
set label 3 "circle/line/random" at screen 0.833,0.99 center
unset parametric
set title "parametric OFF"
plot @CircleFirst, @Line, @Random,
set parametric
set title "parametric ON"
plot @Circle, @Line, @Random,
set samples 24
unset parametric
set title "parametric OFF"
plot @CircleFirst, @Line, @Random,
set parametric
set title "parametric ON"
plot @Circle, @Line, @Random,
unset multiplot
### end of code
我怎样做才能获得 1:1 比率?
set size ratio 1.0
将强制绘图为正方形。
但是它们将是非常小的正方形,除非您采取措施防止标题和 top/bottom 边距占据大部分 space.
要了解其工作原理,请尝试
set tmargin 0
set bmargin 0
set title offset 0,-1
###
... rest of commands as before ...
###
然后您可以决定如何调整标题位置或如何标记各个图,这样就不需要额外的垂直 space。您还可以考虑使用 set multiplot layout
命令的 margins
关键字。