5.4 LaTeX and PyXPlot

The text command can straightforwardly be used to render simple one-line LaTeX strings, but sometimes the need arises to place more substantial blocks of text onto a plot. For this purpose, it can be useful to use the LaTeparbox or minipage environmentsRemember, any valid LaTeX string can be passed to the text command and set label command. For example:

 
text '\parbox[t]{6cm}{\setlength{\parindent}{1cm} \
\noindent There once was a lady from Hyde, \\ \
Who ate a green apple and died, \\ \
\indent While her lover lamented, \\ \
\indent The apple fermented, \\ \
and made cider inside her inside.}'

If unusual mathematical symbols are required, for example those in the amsmath package, such a package can be loaded using the set preamble command. For example:

 
set preamble \usepackage{marvosym}
text "{\Huge\Dontwash\ \NoIroning\ \NoTumbler}$\;$ Do not \
wash, iron or tumble-dry this plot."