Gnuplot-如何获得没有任何意义的图形? (我只希望有轴,标题以及x-和y-标签) [英] Gnuplot - how can I get a figure with no point on it ? (I want to have only the axes, the title and the x- and y- labels)

查看:58
本文介绍了Gnuplot-如何获得没有任何意义的图形? (我只希望有轴,标题以及x-和y-标签)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须制作一个视频,展示一些数量随时间的变化.我正在用gnuplot创建图像,并将它们组装成电影.我在生成两个第一张图像时遇到麻烦:第一张图像应该上面没有点(应该只显示图形的标题,x和y轴以及轴的标签),第二张图像应该只有一个点.

I have to create a video presenting the evolution of some quantities as functions of time. I am creating images with gnuplot and I assemble them to make a movie. I am getting trouble generating the two first images: the first image is supposed to have no point on it (it is supposed to show only the title of the graph, the x and y axes and the labels of the axes) and the second one is supposed to have one single point on it.

  • 是否可以使用gnuplot创建一个不包含任何数据的图形?

  • Is it possible to create a graph containing no data on it with gnuplot?

是否可以使用gnuplot使用输入文件创建包含一个点的图形?输入文件包含:

Is it possible to create a graph containing one single point with gnuplot using an input file? The input file contains:

0 15

预先感谢您的回答,

朱利安

推荐答案

要绘制一个空图,只需绘制一个完全未定义的函数,如

To plot an empty graph, just plot a completely undefined function like

plot NaN

这里的主要问题是,由于没有有效点,因此自动缩放失败.您必须给出一个固定的xrange和yrange才能得到一个图:

The main issue here is, that the autoscaling fails since there are no valid points. You must give a fixed xrange and yrange to get a plot:

set xrange [0:1]
set yrange [0:1]
plot NaN notitle

绘制单个点可以很好地使用

Plotting a single point works fine using

plot 'file.dat' using 1:2 with points

您将收到警告,提示Warning: empty x range [0:0], adjusting to [-1:1]Warning: empty y range [15:15], adjusting to [14.85:15.15],但您会看到一个图.要删除警告,您必须再次提供固定的xrange和yrange.

You'll get warnings saying Warning: empty x range [0:0], adjusting to [-1:1] and Warning: empty y range [15:15], adjusting to [14.85:15.15], but you get a plot. To remove the warnings, you must again provide a fixed xrange and yrange.

这篇关于Gnuplot-如何获得没有任何意义的图形? (我只希望有轴,标题以及x-和y-标签)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆