|
From: CAB <ca...@ya...> - 2011-09-14 21:34:46
|
Hey, All,
I've combed the documentation ad nauseum, but I can't find a solution for this one, besides a very brute-force one.
Let's say I've set my default sans-serif font as 'Arial'. Fine.
Now, let's say, in a standard plot, I set the x label of this plot using something like:
matplotlib.pyplot.xlabel('f(x) (widgets/quatloo)')
Fine again.
But now, let's say I want to italicize only the 'f' and 'x'. I can't find any easy way to do that while retaining the Arial font.
And no, I don't want to use TeX. Target users' computers might not have it.
I've tried using mathtext, but that uses one of mathtext's fonts, not mine (computer modern, etc., or sansserif, etc.)
I've tried setting mathregular, but that won't allow me to vary italic/nonitalic text.
I'm left with not labeling the axes at all, but simply putting four different text objects next to each other and hoping that it doesn't look too jury-rigged.
Either that, or Photoshop the puppy.
Any suggestions?
Chad |