axis tick labels, subplot spacing

I am wondering it it is possible to:

1. Modify the spacing between subplots; currently they are cramped for
some plots that I am generating

2. Reduce the font size of the tick labels (not the axis labels);
large font size for subplot ticks is contributing to the crowded look
mentioned above.

Perhaps I am quite blind, but I could not find these in the tutorial
nor in a quick search of the mailing list archive.

Thanks for any help.

c.

Chris Fonnesbeck wrote:

I am wondering it it is possible to:

1. Modify the spacing between subplots; currently they are cramped for
some plots that I am generating

2. Reduce the font size of the tick labels (not the axis labels);
large font size for subplot ticks is contributing to the crowded look
mentioned above.

Perhaps I am quite blind, but I could not find these in the tutorial
nor in a quick search of the mailing list archive.

Thanks for any help.

Did you check the FAQ, specifically http://matplotlib.sourceforge.net/faq.html#TEXTOVERLAP ?

I apologize if the answer to this is published in some painfully obvious location. It seems like it must be a FAQ, but I can't find it ...

AFAICT, It is not possible to mix text and TeX symbols in a string and have it come out right. For example, in

xlabel(r'$\rm{Normalized Temperature} (kT/\epsilon)$'

The text comes out in TeX math mode ... not so pretty. Please tell me what I've overlooked.

-gary

Gary wrote:

AFAICT, It is not possible to mix text and TeX symbols in a string and have it come out right. For example, in

xlabel(r'$\rm{Normalized Temperature} (kT/\epsilon)$'
The text comes out in TeX math mode ... not so pretty. Please tell me what I've overlooked.

well, I'm not sure how this is supported in matplotlib, but in LaTex,you would do:

Normalized Temperature $(kT/\epsilon)$

or:

$\text{Normalized Temperature} (kT/\epsilon)$

the "$" means put it in math mode, if you don't want "Normalized Temperature" in math mode, don't put it inside the $$. The second puts it all in math mode, but the text{} means set this in text mode.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Chris Barker wrote:

Gary wrote:

AFAICT, It is not possible to mix text and TeX symbols in a string and have it come out right. For example, in

xlabel(r'$\rm{Normalized Temperature} (kT/\epsilon)$'
The text comes out in TeX math mode ... not so pretty. Please tell me what I've overlooked.

well, I'm not sure how this is supported in matplotlib, but in LaTex,you would do:

Normalized Temperature $(kT/\epsilon)$

or:

$\text{Normalized Temperature} (kT/\epsilon)$

the "$" means put it in math mode, if you don't want "Normalized Temperature" in math mode, don't put it inside the $$. The second puts it all in math mode, but the text{} means set this in text mode.

-Chris

Matplotlib doesn't support \text, and it requires that the first and last characters of a TeX string be $. I guess it only processes mathmode. Well, it can't do *everything*. It would be nice to figure out a workaround...

thx,
-gary

Gary wrote:

Matplotlib doesn't support \text, and it requires that the first and last characters of a TeX string be $. I guess it only processes mathmode. Well, it can't do *everything*.

Oh well, I've always thought that if you want to support Math in a graphics package, you would actually use TeX, rather than emulating it. Maybe like PyX:

http://pyx.sourceforge.net/

The problem, of course, is that requiring a TeX system is a BIG dependency! It would be nice if one could re-package the Tex interpreter to be embedded. I have no idea how big a job that would be. You'd also have all the font issues, of course, but while that would all be a lot of work, I'm not sure it would be more work than trying to re-write TeX!

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

OTOH: many people working in science will already have a TeX system
installed, I'd guess.

Another thought: What about an optional PyX back-end for matplotlib?
(If one is interested in really good postscript
output I think PyX is great. Transparency etc.
might be problematic with postscript,
but a combination of postscript lines, symbols and math with bitmapped
graphics should be possible for the PyX back-end).

Best,

Arnd

P.S.: Just to be sure: I am not saying that the postscript
output of matplotlib is bad (Haven't even tested it).

···

On Tue, 26 Oct 2004, Chris Barker wrote:

Gary wrote:

> Matplotlib doesn't support \text, and it requires that the first and
> last characters of a TeX string be $. I guess it only processes
> mathmode. Well, it can't do *everything*.

Oh well, I've always thought that if you want to support Math in a
graphics package, you would actually use TeX, rather than emulating it.
Maybe like PyX:

http://pyx.sourceforge.net/

The problem, of course, is that requiring a TeX system is a BIG
dependency! It would be nice if one could re-package the Tex interpreter
to be embedded. I have no idea how big a job that would be. You'd also
have all the font issues, of course, but while that would all be a lot
of work, I'm not sure it would be more work than trying to re-write TeX!

-Chris