Hello list,

in the small example below with xscale and yscale logarithmic I'm not able to 
set the xlabel inside the axes initialisation. The error output is attached. 
It doesn't happen if I use the pylab command 'xlabel' or set one of the 
scalings to linear.

Is this a bug or do I miss anything? 

Thanks in advance for any hints.

regards Matthias

>-------------------------------------------------
import matplotlib.pyplot as plt

ax = plt.subplot(111, autoscale_on=False,
                 xscale="log", yscale="log",
                 xlim=(1, 10**4), ylim=(10**-4, 1),
                 xlabel="logx",
                 )
#plt.xlabel('logx')
plt.show()
>-------------------------------------------------------
Traceback (most recent call last):
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py",
 line 352, in expose_event
    self._render_figure(self._pixmap, w, h)
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/backends/backend_gtkagg.py",
 line 75, in _render_figure
    FigureCanvasAgg.draw(self)
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/backends/backend_agg.py",
 line 282, in draw
    self.figure.draw(self.renderer)
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/figure.py", line 
773, in draw
    for a in self.axes: a.draw(renderer)
  File "/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/axes.py", 
line 1668, in draw
    a.draw(renderer)
  File "/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/axis.py", 
line 736, in draw
    tick.draw(renderer)
  File "/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/axis.py", 
line 188, in draw
    self.tick1line.draw(renderer)
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/lines.py", line 
503, in draw
    tpath, affine = self._transformed_path.get_transformed_points_and_affine()
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/transforms.py", 
line 2197, in get_transformed_points_and_affine
    self._revalidate()
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/transforms.py", 
line 2184, in _revalidate
    self._transform.transform_path_non_affine(self._path)
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/transforms.py", 
line 1148, in transform_path_non_affine
    return Path(self.transform_non_affine(path.vertices), path.codes)
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/transforms.py", 
line 1745, in transform_non_affine
    return self.transform(points)
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/transforms.py", 
line 1721, in transform
    x_points = x.transform(points)[:, 0:1]
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/transforms.py", 
line 1895, in transform
    self._a.transform(points))
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/transforms.py", 
line 1398, in transform
    mtx = self.get_matrix()
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/transforms.py", 
line 1978, in get_matrix
    self._a.get_matrix())
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/transforms.py", 
line 2114, in get_matrix
    inl, inb, inw, inh = self._boxin.bounds
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/transforms.py", 
line 360, in _get_bounds
    x0, y0, x1, y1 = self.get_points().flatten()
  File 
"/scratch/michler/SOFT//lib/python2.5/site-packages/matplotlib/transforms.py", 
line 974, in get_points
    points.putmask(0.0)
AttributeError: 'MaskedArray' object has no attribute 'putmask'
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to