GNUPlot Draw label on x2y2 axes

2019-08-06 03:39发布

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 :-)

1条回答
一纸荒年 Trace。
2楼-- · 2019-08-06 04:01

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
查看更多
登录 后发表回答