Gnuplot图中的一般失准 [英] General misalignment in Gnuplot graph

查看:90
本文介绍了Gnuplot图中的一般失准的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在Gnuplot图形中发现了对齐问题。我选择了一个简单的情节作为演示-代码:

I have recently found an issue with alignment in Gnuplot graphs. I have selected simple plot as demonstration - code:

plot sin(x)
set term wxt size 1600,1200 enhanced lw 2 font "Arial, 14"

将产生此图
[单击此处]

问题例如在 0刻度上看到,其中值不以刻度为中心,或者在图例文本上不以键符号为垂直居中。

The problem is seen for example at "0" tick, where the value is not centered with the tick, or at legend text, which is not vertically centered with the key symbol.

我发现,选择Qt终端后,该问题将消失,但是我仍然宁愿使用wxt,这些小缺陷也让我很烦恼。
当选择pdf终端时,该问题仍然存在。

I have discovered, that the issue will disappear when Qt terminal is selected, but I will still rather use wxt and these little imperfections bother me a lot. The issue is still present when pdf terminal is selected.

我认为这种行为与Windows系统上的高屏幕分辨率(4k)有关,例如我从未见过具有标准显示器(即1920x1080 px分辨率)的PC之类的东西。

My thought is that such behavior is related to high screen resolution (4k) on Windows system,as I have never observed such thing as PCs with standard monitors (i.e 1920x1080 px resolution).

当应用程序按系统缩小比例时,情况会变好,但是此设置会产生像素化

The situation gets better when the application is downscaled by system, but this setting produces pixelated plots via wxt terminal.

有人知道如何处理吗?谢谢您的任何建议:-)

Does anybody know how to deal with this? Thank you for any advice :-)

推荐答案

轴运动的默认格式为%h。注意h前面的空间。我认为您所看到的是标签实际上是 0,并且放置位置以一对字符为中心。

The default format for axis tics is "% h". Note the space in front of the h. I think what your are seeing is that the label is actually " 0" and the placement centers the pair of characters.

set format "%h"

您可以将默认格式改为%h,但请注意由于程序假定轴标签之前总是有一个空格,因此这可能会导致其他难以理解的问题。

You can change the default format to "%h" instead, but be warned that this may possibly cause other obscure problems due to the program assuming there is always a space preceding an axis label.

这篇关于Gnuplot图中的一般失准的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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