Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add text to an arrow in GnuPlot

Tags:

octave

gnuplot

Is it possible to add text to an arrow in gnuplot?

Lets say I draw an arrow:

set arrow from 0,0 to 1,1 head
plot(x)

Is it possible to attach this arrow some text ?

Thanks

like image 934
hudac Avatar asked May 29 '13 18:05

hudac


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 do you write subscripts in gnuplot?

I want to use super/subscripts in a text. You can write the supersript as X^2, and the subscript is Y_3. To make several letters super- / sub-script, you need brace like Z_{64}. To use super and subscripts at the same time, try Z@^2_{64}. The following is an example to make legends with the superscripts.

How are labels and arrows helpful?

An arrow and a label are used to point out an oddity in the data . The label contains the Unicode character π (see the sidebar in section 5.1 for more information on Unicode and how to enter Unicode characters in gnuplot).

What is plot in gnuplot?

plot and splot are the primary commands in Gnuplot. They plot functions and data in many many ways. plot is used to plot 2-d functions and data, while splot plots 3-d surfaces and data.


1 Answers

Yes. Use this command:

set label "arrow" at 1,1

More details on label can be found here
To be fair, it doesn't attach the text/label to the arrow, but places it on the graph. As you know where your arrow is, you can collocate that with the label though.

like image 165
Schorsch Avatar answered Oct 11 '22 00:10

Schorsch