Plots.jl可以添加字幕吗?

问题描述 投票:0回答:1

考虑以下情节:

我想将“分析数据范围:... 2020-01-01”作为具有不同属性的副标题,即较小的字体。是否可以?截至目前,我在

plot
函数中使用了以下关键字参数:

title="Cepstral Coefficients\nAnalysed data range: $(startdt) to $(enddt)"

因此,它是使用

\n
字符串文字分隔的。

julia plots.jl
1个回答
0
投票

您可以尝试使用以下格式的

using LaTeXStrings

plot(rand(3), title=LaTeXString("Main title 1\n\$^\\textrm{subtitle\\ of\\ plot}\$"))

请注意,上标仅在数学模式下可用,因此空格格式更复杂。

© www.soinside.com 2019 - 2024. All rights reserved.