problem with label if x/yscale are both log

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()

output (2.89 KB)

···

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

Hello list,

may be the last message got lost among the lots of mpl-mails, but I really
want to know if anyone else can reproduce this behaviour and if this
behaviour is expected.

Thanks in advance for any comments.

I still get the same error with matplotlib
__version__ : '0.98.6svn'
__revision__ : '$Revision: 6887 $'

best regards Matthias

···

On Tuesday 03 March 2009 17:35:49 Matthias Michler wrote:

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()

>-------------------------------------------------------

yes I can exactly reproduce your error. Something is fishy with errorbar and log scales....
Johann

Matthias Michler wrote:

···

Hello list,

may be the last message got lost among the lots of mpl-mails, but I really want to know if anyone else can reproduce this behaviour and if this behaviour is expected.

Thanks in advance for any comments.

I still get the same error with matplotlib
__version__ : '0.98.6svn'
__revision__ : '$Revision: 6887 $'

best regards Matthias

On Tuesday 03 March 2009 17:35:49 Matthias Michler wrote:
  

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()

-------------------------------------------------------
      
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

It seems there's some order dependence here. I have changed the Axes constructor so the scale is set before the labels, and this seems to resolve this bug.

Fixed in SVN r7016

Mike

Matthias Michler wrote:

···

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()
  

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

------------------------------------------------------------------------------
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

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA