Matplotlib-users digest, Vol 1 #450 - 6 msgs

Hi a quick question: - how do I write a label like this:

    > ylabel("$\sigma_{\rm{R}} / \sigma_e$")

    > to have: sigma_R / sigma_e with the R in \rm mode ?

    > At the moment it does not seem to work..

Hi Eric,

Yes, this reflects a bug in the parser -- thanks for letting me know.
FYI, there is also a bug in your code: remember that it is necessary
to use quoted "raw" strings to protect the backslashes. With the
amended parser I'm attaching below, both of the following parse

    from pylab import *
    ylabel(r"$\sigma_{\rm{R}} / \sigma_e$", fontsize=20)
    xlabel(r"$\sigma_\rm{R} / \sigma_e$", fontsize=20)

    > [Is there any exhaustive list of what we can do in
    > latex-like mode ? I am for example looking for different
    > ways to include ''spaces'']

Information about space handling is included in the module
documentation, eg at

  The spacing elements \ , \/ and \hspace{num} are provided. \/
  inserts a small space, and \hspace{num} inserts a fraction of the
  current fontsize. Eg, if num=0.5 and the fontsize is 12.0,
  hspace{0.5} inserts 6 points of space

and this information can also be found in the User's Guide section
"mathtext" (section 2.6.4 in Also in the
module documentation linked above is a listing of mathtext symbols

  \/ \Delta \Downarrow \Gamma \Im \LEFTangle \LEFTbrace \LEFTbracket
  \LEFTparen \Lambda \Leftarrow \Leftbrace \Leftbracket \Leftparen
  \Leftrightarrow \Omega \P \Phi \Pi \Psi \RIGHTangle \RIGHTbrace
  \RIGHTbracket \RIGHTparen \Re \Rightarrow \Rightbrace \Rightbracket
  \Rightparen \S \SQRT \Sigma \Sqrt \Theta \Uparrow \Updownarrow
  \Upsilon \Vert \Xi \aleph \alpha \approx \angstrom \ast \asymp
  \backslash \beta \bigcap \bigcirc \bigcup \bigodot \bigoplus
  \bigotimes \bigtriangledown \bigtriangleup \biguplus \bigvee
  \bigwedge \bot \bullet \cap \cdot \chi \circ \clubsuit \coprod \cup
  \dag \dashv \ddag \delta \diamond \diamondsuit \div \downarrow \ell
  \emptyset \epsilon \equiv \eta \exists \flat \forall \frown \gamma
  \geq \gg \heartsuit \hspace \imath \in \infty \int \iota \jmath
  \kappa \lambda \langle \lbrace \lceil \leftangle \leftarrow
  \leftbrace \leftbracket \leftharpoondown \leftharpoonup \leftparen
  \leftrightarrow \leq \lfloor \ll \mid \mp \mu \nabla \natural
  \nearrow \neg \ni \nu \nwarrow \odot \oint \omega \ominus \oplus
  \oslash \otimes \phi \pi \pm \prec \preceq \prime \prod \propto \psi
  \rangle \rbrace \rceil \rfloor \rho \rightangle \rightarrow
  \rightbrace \rightbracket \rightharpoondown \rightharpoonup
  \rightparen \searrow \sharp \sigma \sim \simeq \slash \smile
  \spadesuit \sqcap \sqcup \sqrt \sqsubseteq \sqsupseteq \subset
  \subseteq \succ \succeq \sum \supset \supseteq \swarrow \tau \theta
  \times \top \triangleleft \triangleright \uparrow \updownarrow
  \uplus \upsilon \varepsilon \varphi \varphi \varrho \varsigma
  \vartheta \vdash \vee \vert \wedge \wp \wr \xi \zeta

I have been working on a comprehensive listing of all supported
mathtext commands for the user's guide, but was delayed over
formatting all these symbols properly into latex tables.

JDH (36.8 KB)

Hi John,
sorry to bother you about this again, but is there a fix to the bug
in the imshow routine (using the aspect='preserve' option).
If not, let me know if you have an idea when this could be done
(no pushing there, just to plan things on my side: I am at the moment
using an artificial way to replace that option by calculating coordinates
on the plot, just to know if I need to go on with that or not).

Let me know; Thanks!




Observatoire de Lyon emsellem@...419...
9 av. Charles-Andre tel: +33 4 78 86 83 84
69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86