Re: python plotting with greek symbols within labels recommendations?

2005-10-05 Thread Juho Schultz
[EMAIL PROTECTED] wrote:
 hello all,
 
 this message is geared toward those of you in the scientific community.
 i'm looking for a python plotting library that can support rendering
 greek symbols and other various characters on plot axes labels, etc. I
 would prefer something that adheres to tex formatting (as implemented
 in latex, matlab, etc and has the form $\alpha$ to represent the greek
 character alpha for example).
 
 thus far, i've found that matplotlib
 (http://matplotlib.sourceforge.net/) can do this, albeit the
 implementation is so poor that you cannot mix standard text with
 symbols on the same plot element.
 
 

If you already have installed matplotlib, have a look at
matplotlib-0.X.Y/examples/tex_demo.py
It shows you how to mix text and symbols.
The other examples in the directory could also be useful.

Essentially you need to remember 
matplotlib.rc('text', usetex=True)
before plotting.

If you need complex stuff (fractions, sums, integrals) try
putting an r before the string: pylab.ylabel(
rDensity $\left(\rho =\frac{x^2+\frac{x+1}{x-1}}{\kappa(x)K_{ij}}\right))
works fine, at least on my system.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python plotting with greek symbols within labels recommendations?

2005-10-05 Thread wobsta
Hi,

[EMAIL PROTECTED] wrote:
 this message is geared toward those of you in the scientific community.
 i'm looking for a python plotting library that can support rendering
 greek symbols and other various characters on plot axes labels, etc. I
 would prefer something that adheres to tex formatting (as implemented
 in latex, matlab, etc and has the form $\alpha$ to represent the greek
 character alpha for example).

You may want to have a look at PyX (pyx.sourceforge.net), which
features a seamless TeX integration for all typesetting tasks and thus
allows you to use TeX syntax all over the place.

André

-- 
http://mail.python.org/mailman/listinfo/python-list


python plotting with greek symbols within labels recommendations?

2005-10-04 Thread michael . s . gilbert
hello all,

this message is geared toward those of you in the scientific community.
i'm looking for a python plotting library that can support rendering
greek symbols and other various characters on plot axes labels, etc. I
would prefer something that adheres to tex formatting (as implemented
in latex, matlab, etc and has the form $\alpha$ to represent the greek
character alpha for example).

thus far, i've found that matplotlib
(http://matplotlib.sourceforge.net/) can do this, albeit the
implementation is so poor that you cannot mix standard text with
symbols on the same plot element.

pygrace (http://www.its.caltech.edu/~mmckerns/software.html) seems to
be able to inherently support symbols, but it doesn't follow the tex
formatting.  it has its own (seemingly arbitrary) syntax.

any thoughts on plotting libraries would be much appreciated.

mike

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python plotting with greek symbols within labels recommendations?

2005-10-04 Thread Robert Kern
[EMAIL PROTECTED] wrote:
 hello all,
 
 this message is geared toward those of you in the scientific community.
 i'm looking for a python plotting library that can support rendering
 greek symbols and other various characters on plot axes labels, etc. I
 would prefer something that adheres to tex formatting (as implemented
 in latex, matlab, etc and has the form $\alpha$ to represent the greek
 character alpha for example).
 
 thus far, i've found that matplotlib
 (http://matplotlib.sourceforge.net/) can do this, albeit the
 implementation is so poor that you cannot mix standard text with
 symbols on the same plot element.

You can if you have TeX installed and enable text.usetex in your
configuration. E.g.

In [4]: title('This is $\Gamma$reek to me.')

There isn't much out there that allows a reasonably full range of TeX
without calling out to TeX.

If you want to improve the non-TeX fallback for matplotlib's mathtext
module to support math-mode text embedded in plain text, I'm sure John
would love to see your contribution. It shouldn't be that hard; it's
just nobody's had the motivation to work on it given the availability of
real TeX labels.

-- 
Robert Kern
[EMAIL PROTECTED]

In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die.
  -- Richard Harter

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python plotting with greek symbols within labels recommendations?

2005-10-04 Thread Robert Kern
[EMAIL PROTECTED] wrote:
 hello all,
 
 this message is geared toward those of you in the scientific community.
 i'm looking for a python plotting library that can support rendering
 greek symbols and other various characters on plot axes labels, etc. I
 would prefer something that adheres to tex formatting (as implemented
 in latex, matlab, etc and has the form $\alpha$ to represent the greek
 character alpha for example).
 
 thus far, i've found that matplotlib
 (http://matplotlib.sourceforge.net/) can do this, albeit the
 implementation is so poor that you cannot mix standard text with
 symbols on the same plot element.

And, incidentally, if you're only interested in letters and symbols
strung out horizontally with the Latin characters rather than formula
layout, you can use Unicode if your font supports it:

In [41]: s
Out[41]: u'This is \u0393reek to me'

In [42]: rc('font', serif=['Code2000'])

In [43]: title(s)

-- 
Robert Kern
[EMAIL PROTECTED]

In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die.
  -- Richard Harter

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python plotting with greek symbols within labels recommendations?

2005-10-04 Thread skip

mike thus far, i've found that matplotlib
mike (http://matplotlib.sourceforge.net/) can do this, albeit the
mike implementation is so poor that you cannot mix standard text with
mike symbols on the same plot element.

That seems a bit harsh.  Have you asked on the matplotlib mailing list to
see if it can do what you want?

Skip
-- 
http://mail.python.org/mailman/listinfo/python-list