Julien
Julien

Reputation: 137

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)

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.

Thank you in advance for your answers,

Julien

Upvotes: 2

Views: 1279

Answers (1)

Christoph
Christoph

Reputation: 48390

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

plot NaN

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

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.

Upvotes: 4

Related Questions