On Wed, Sep 14, 2011 at 4:34 PM, CAB <ca...@ya...> wrote:
>
>
> 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.
>
That's fine, that's why matplotlib imitates TeX with mathtext...
>
> I've tried using mathtext, but that uses one of mathtext's fonts, not mine
> (computer modern, etc., or sansserif, etc.)
>
I am sure there must be some way to change the font, but Arial might not be
supported for this... haven't tried though.
>
> I've tried setting mathregular, but that won't allow me to vary
> italic/nonitalic text.
>
>
Could you include some examples of what you tried?
> 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.
>
>
Yeah, based on your requirements (italicize individual characters) your
choices are to either use the latex-like syntax that matplotlib allows for,
or to individually set the characters in their own text boxes. But, really,
I think if you rethink your requirements, then you will realize that
mathtext is the better way to go. It looks much more aesthetically pleasing
that way.
> Either that, or Photoshop the puppy.
>
>
Let's see if we can avoid that...
Cheers,
Ben Root
|