【问题标题】:Spacing not wrong when printing plot with subscript in ylabel in octave在八度音阶的 ylabel 中打印带下标的绘图时间距没有错
【发布时间】:2019-03-03 13:12:14
【问题描述】:

使用print打印时,y轴标签上的间距全部错误

重现问题的代码是:

data1 = [1:10:100]
data2 = [100:10:200]
file = "plottest.png"

[at ho ht] = plotyy(data1,data1,data2,data2);
ylabel(at(1),"Concentration of O_2 (mol/m^3)");

print(gcf,file);

我正在使用 qt 图形工具。

输出到图形窗口(以及所需的结果):

打印到 PNG 文件的内容:

【问题讨论】:

  • 欢迎来到本站!请发布一段可运行的代码,以便帮助您的人重现该问题。
  • 我似乎得到了正确的结果,比如saveas(gcf, 'file.pdf')。您使用的是什么操作系统/八度版本?
  • Windows 7 Octave 版本 4.2.2(我更新了看看它是否更正了错误,但它没有)
  • 试过saveas但没用
  • 您是否尝试过不同的后端? Octave 可以使用不同的后端,但它们在所有用途中的效果都不尽相同。

标签: image octave matlab-figure


【解决方案1】:

一种解决方法是使用乳胶解释器

ylabel(at(1),"Concentration of $O_2$ (mol/m^3)", 'Interpreter', 'latex');

【讨论】:

    猜你喜欢
    • 2011-09-11
    • 1970-01-01
    • 2012-09-27
    • 2014-11-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-01
    相关资源
    最近更新 更多