如何用gnuplot连接test.dat数据点并固定Y轴范围?
gnuplot 折线绘制与Y轴范围设置方案
绘制连接数据点的折线:
默认plot 'test.dat'仅显示离散点,只需在命令后添加绘图样式选项即可:- 若要同时显示数据点和折线,使用:
plot 'test.dat' with linespoints - 若仅需要折线(隐藏数据点),使用:
plot 'test.dat' with lines
- 若要同时显示数据点和折线,使用:
固定Y轴范围为0到1000:
在执行plot命令前,先设置Y轴范围,再执行绘图命令:set yrange [0:1000] plot 'test.dat' with linespoints若想让该Y轴范围成为默认设置,可将
set yrange [0:1000]写入gnuplot配置文件(通常为~/.gnuplot),下次启动gnuplot时会自动加载该配置。
内容的提问来源于stack exchange,提问作者Cheetaiean
相关产品推荐
相关产品推荐

