Dear all,

I have a rather complex code that takes a list of file names and of
legend tags from command line and compute contour plots

./contour_plots.py [options] filename1 ... filename2 tag1 ... tagn

The codes make filled contours at required levels, then line contours.
>From the latter I extract one line from each file and create a legend

spl.legend(lines, [tag1...tagn], other options)

All it works fine. The only problem is that sometimes I have tags that
are long and I would like to be able to break between multiple lines.
In examples/legend_demo3.py is shown that 'ax1.plot([1],
label="multi\nline")' the \n is interpreted (correctly) as new line.

Normaly I have something like
./contour_plots.py [options] filename1 \(long\)tag\$_\{very long\}\$
that gives me a legend with the correct formatting. If I try to add a
'\n' after 'tag', I get out the tag as before plus a 'n' after 'tag'.
I've tried to enclose the whole string or just \n in "" or r"" but
nothing good happens (either I get 'n' or 'rn').
Is there a way to do what I want to do?

Thanks in advance
Francesco

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to