Subscript / Superscript Text not using TeX or Mathtext?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Subscript / Superscript Text not using TeX or Mathtext?

Sascha-4
Is there any chance to get subscript / superscript formatting for text in
Matplotblib without using TeX or Mathtext?

TIA,
Sascha

--
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f?r Mail, Message, More +++


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Subscript / Superscript Text not using TeX or Mathtext?

John Hunter-8
>>>>> "Sascha" == Sascha GL <[hidden email]> writes:

    Sascha> Is there any chance to get subscript / superscript
    Sascha> formatting for text in Matplotblib without using TeX or
    Sascha> Mathtext?

We special cased numerical superscripting (10^3) to make log plots
faster and to keep the fonts consistent.  But we haven't done this for
general superscripting.  Note that there is a bug in the current
text.py which prevents event this from working, as Arnd Baeker noted
in a recent post.  Fortunately, it is a one line fix so if you do need
this feature make the corrections suggested there.  Also, you could
hack rgxsuper in text.py to match a larger class of strings, which
would give you at least superscripting w/o mathtext or TeX.

May I ask, why you want to avoid mathtext?  My guess is that you don't
like the fonts, and this is perfectly understandable.  I would like to
rewrite mathtext to work with arbitrary fonts rather than the cm*
ones, but it is a question of time and priorities.

If you tell us why you don't want to use TeX or mathtext, we might be
better positioned to suggest alternatives or workarounds.

JDH


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Subscript / Superscript Text not using TeX or Mathtext?

Sascha-4
> We special cased numerical superscripting (10^3) to make log plots
> faster and to keep the fonts consistent.  But we haven't done this for
> general superscripting.  Note that there is a bug in the current
> text.py which prevents event this from working, as Arnd Baeker noted
> in a recent post.  Fortunately, it is a one line fix so if you do need
> this feature make the corrections suggested there.  Also, you could
> hack rgxsuper in text.py to match a larger class of strings, which
> would give you at least superscripting w/o mathtext or TeX.

Aaah... sounds like this is not the end of the road. I'll take a look at
rgxsuper then. There is no example around, is there?

> May I ask, why you want to avoid mathtext?  My guess is that you don't
> like the fonts, and this is perfectly understandable.  I would like to
> rewrite mathtext to work with arbitrary fonts rather than the cm*
> ones, but it is a question of time and priorities.

You are exactly right - the fonts are not to my liking. Also, I have some
trouble getting TeX to work with MPL (I am developing on Win32, but
deploying on a Linux box) so that I was hoping to get around it.

Thanks a lot!

Sascha



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users