Is it possible to make a multi-line plot title in Pyxplot? I do understand that the "set title" command accepts a LaTeX string and have tried to inject a newline in many ways.

Ultimately it seems that Pyxplot is just ignoring the newline directive. For example:

set title 'First line$\newline$Second line'

will generate a title that reads "First lineSecond line".

Is there a trick to make this work somehow?

I am using Pyxplot 0.9.2.

有帮助吗?

解决方案

Per Christoph in the comments above:

You can try putting everything in a \parbox, see "10.15 LaTeX and Pyxplot": set title '\parbox{6cm}{\centering First line\newline Second line}'. I cannot test it, therefore I just post it as comment.

\parbox does seem to do the trick. I tested this and it did allow me to perform line breaks.

Thanks!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top