Pergunta

I want to place a label on a plot which uses autoscale.

To keep the label at the same position i want to use alternative axis which don't use autoscale to get an absolute location.

How can I choose the uses axis of a "set label" statement?

set y2range [0:10]
set x2range [0:100]
set label "FooBar" at 10, 5

Line 3: something is missing here. "axes x2y2" wont work (used in plot label functions)

Thanks for helping me out here :-)

Foi útil?

Solução

There are different coordinate systems which you can use to place labels (see help coordinates in the interactive terminal):

  • first, uses the first axis (x, y) as reference
  • second, uses the second axis (x2, y2) as reference
  • screen, relative to the canvas size
  • graph, relative to the plot size
  • character, in character units.

So the best way to get an absolute location inside the plot is with graph:

set label "FooBar" at graph 0.2, 0.2

You can also mix the coordinate systems:

set label "FooBar" at graph 0.2, screen 0.5
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top