Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to draw just arrow in gnuplot

Tags:

plot

gnuplot

In gnuplot, we draw arrow as:

set arrow from 0,0 to 1,1

I want to make a plot with just arrows and no other data. How can I do this. Right now, after setting arrows, I need to give something to plot, since without that arrows don't get plotted. Is it possible to draw just an empty 'plot' without any data?

I have also seen online help on gnu etc., but could not get the answer resolved.

like image 499
user984260 Avatar asked Mar 21 '13 17:03

user984260


People also ask

How to add arrow in gnuplot?

Arbitrary arrows can be placed on a plot using the set arrow command. 5#5tag6#6 is an integer that identifies the arrow. If no tag is given, the lowest unused tag value is assigned automatically.

How use gnuplot to plot data from a file?

To plot functions simply type: plot [function] at the gnuplot> prompt. Discrete data contained in a file can be displayed by specifying the name of the data file (enclosed in quotes) on the plot or splot command line. Data files should have the data arranged in columns of numbers.

Does R use gnuplot?

gnuplot can be used from various programming languages to graph data, including Perl (via PDL and other CPAN packages), Python (via gnuplotlib, Gnuplot-py and SageMath), R via (Rgnuplot), Julia (via Gaston.

How do I access gnuplot?

Running gnuplot is easy: from a command prompt on any system, type gnuplot. It is even possible to do this over a telnet or ssh connection, and preview the graphs in text mode! For best results, however, you should run gnuplot from within X Window, so that you can see better previews of your plots.


1 Answers

If you set explicit axis ranges you can plot NaN to get a clean set of axes.

Also, notitle or t '' is needed to hide the key for NaN.

set xrange [0:5]
set yrange [0:5]
set arrow from 0,0 to 1,1
plot NaN t ''

plot output

like image 129
Digikata Avatar answered Sep 27 '22 18:09

Digikata