GNUPlot在x2y2轴上绘制标签 [英] GNUPlot Draw label on x2y2 axes

查看:128
本文介绍了GNUPlot在x2y2轴上绘制标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在使用自动缩放的绘图上放置标签.

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

第3行:此处缺少某些内容. "axes x2y2"将不起作用(在图形标签功能中使用)

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

感谢您在这里帮助我:-)

Thanks for helping me out here :-)

推荐答案

可以使用不同的坐标系来放置标签(请参见交互式终端中的help coordinates):

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

  • first,使用第一个轴(x,y)作为参考
  • second,使用第二个轴(x2,y2)作为参考
  • screen,相对于画布大小
  • graph,相对于地块大小
  • character,以字符为单位.
  • 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.

因此,获取图内绝对位置的最佳方法是使用graph:

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

这篇关于GNUPlot在x2y2轴上绘制标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆