本文介绍了gnuplot:使用线点绘制文件,但点较少的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想plotGnuplot中具有linespoints的文件,但是该行使用所有数据样本,而点使用较少的数据样本.例如,以下文件绘制了数据,但该行根本不可见.

I want to plot a file with linespoints in Gnuplot but the line using all the data samples and the points using fewer data samples. For example the following file plots the data but the line is not visible at all.

set terminal png
set out "plot_sample.png"
plot [t=-1000:1000] t w linespoints pt 64 lt 10 ps 1.5

如果我想为这些点定义一个自定义的采样间隔,但将所有数据样本用于该行,该怎么办?我可以在同一张图中做两个单独的图,但是键将分别显示两个图.

How to do it if I want to define a custom sampling interval for the points but use all the data samples for the line? I could do two separate plots in the same figure but then the key will show both of them separately.

推荐答案

使用pointinterval减少绘制点的数量,但保留所有绘制线条的点:

Use pointinterval to reduce the number of plotted points, but keep all points for drawing the line:

set samples 100
plot x**2 w linespoints pointinterval 10

这篇关于gnuplot:使用线点绘制文件,但点较少的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 16:52