1

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.

Christoph
  • 47,569
  • 8
  • 87
  • 187
DanJ
  • 1,654
  • 1
  • 16
  • 23
  • 1
    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. – Christoph Apr 08 '14 at 09:31
  • Not familiar with Pyxplot but `\newline` should work without math mode. Have you tried simply doing `Line 1\newline{}Line 2`? – Tom Fenech Apr 09 '14 at 12:40

1 Answers1

1

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!

DanJ
  • 1,654
  • 1
  • 16
  • 23