Hi All,

I get what I consider to be a bug. (I think) the following code should produce a 10 row, 6 column figure with identical plots. However, this code (with current CVS matplotlib), displays a 10 row, 6 column figure with plots of apparently varying x and y limits...

Even adding "set(gca(),'xlim',(1,3)); set(gca(),'ylim',(4,6))" does not help.

Am I confused, or is this a bug?

Cheers!

Andrew

#!/usr/bin/env python

from matplotlib.matlab import *

n_rows = 10

n_cols = 6

row_height = 1.0/n_rows

col_width = 1.0/n_cols

figure()

for row in range(n_rows):

for col in range(n_cols):

axes([ col*col_width, row*row_height,

(col+1)*col_width, (row+1)*row_height ])

plot([1,2,3],[4,5,6])

show()

Arrg!

OK, reading the docstring for axes, I find out that the 3rd and 4th argument are width and height, (not right and top). This all works fine. I was confused...

Cheers!

Andrew

Andrew Straw wrote:

## ···

Hi All,

I get what I consider to be a bug. (I think) the following code should produce a 10 row, 6 column figure with identical plots. However, this code (with current CVS matplotlib), displays a 10 row, 6 column figure with plots of apparently varying x and y limits...

Even adding "set(gca(),'xlim',(1,3)); set(gca(),'ylim',(4,6))" does not help.

Am I confused, or is this a bug?

Cheers!

Andrew

#!/usr/bin/env python

from matplotlib.matlab import *

n_rows = 10

n_cols = 6

row_height = 1.0/n_rows

col_width = 1.0/n_cols

figure()

for row in range(n_rows):

for col in range(n_cols):

axes([ col*col_width, row*row_height,

(col+1)*col_width, (row+1)*row_height ])

plot([1,2,3],[4,5,6])

show()

-------------------------------------------------------

This SF.net email is sponsored by: IT Product Guide on ITManagersJournal

Use IT products in your business? Tell us what you think of them. Give us

Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more

http://productguide.itmanagersjournal.com/guidepromo.tmpl

_______________________________________________

Matplotlib-devel mailing list

Matplotlib-devel@lists.sourceforge.net

matplotlib-devel List Signup and Options