Is it possible to add a subtitle by Plots.jl?

71 Views Asked by At

Consider the following plot: enter image description here

I want to put the "Analysed data range: ... 2020-01-01" as a subtitle with a different attribute, i.e., a smaller font. Is it possible? As of now, I have used the following keyword argument in the plot function:

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

So, it is separated using the \n string literal.

1

There are 1 best solutions below

0
Przemyslaw Szufel On

You could try using LaTeXStrings with the following formatting:

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

Note that superscript is available only in math mode hence more complicated formatting of spaces.

enter image description here