使用 gnuplot 绘制坐标系

Plotting a coordinate system with gnuplot

总的来说,我喜欢 gnuplot 图的外观。但是,我必须为一群只见过 x=0 和 y=0 轴的旧 style/traditional x-y 坐标系的人准备一个情节。为了不混淆他们,我会坚持他们喜欢的风格。

如何在 gnuplot 中实现这一点?

我发现 set xzeroaxis 给出了 x 轴。 (类似于 y 轴)。我还需要:

我怎样才能做到这一点?

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 f(x)