gnuplotpyxplot

Multi-line plot titles in Pyxplot


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.


Solution

  • 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!