Hi,

I would like to report two bugs when using twinx with log-scale axes.

<code>
from pylab import *

rcParams['ytick.major.size'] = 12
rcParams['ytick.minor.size'] = 8

ax1 = subplot(2,1,1,
               title="Bug twinx + semilogy")
ax1.plot(randn(100)**2,'b+')
ax1.semilogy()
setp(ax1.yaxis.get_minorticklines() + \
          ax1.yaxis.get_majorticklines(),
      color='b')

ax2 = ax1.twinx()
ax2.plot(randn(100)**0.5,'r.')
ax2.semilogy()
setp(ax2.yaxis.get_minorticklines() + \
          ax2.yaxis.get_majorticklines(),
      color='r')

ax3 = subplot(2,1,2,
               title="Bug twinx + semilogx")
x = arange(100)+1
ax3.plot(x,randn(100)**2,'b+')
ax3.semilogx()
setp(ax3.get_xticklabels(), color='b')

ax4 = ax3.twinx()
ax4.plot(x,randn(100)**0.5,'r.')
setp(ax4.get_xticklabels(), color='r')

show()
</code>

Top: Bug twinx + semilogy.

See the blue and red ticks on the left y-axis: the red ticks should not 
be there (the right y-axis is correct). Note that the problem does not 
occur when using linear scales (just comment out the 2 semilogy lines).

Bottom: Bug twinx + semilogx.

The twinx axis (ax4) is linear by default and does not inherit the log 
scale from the parent axis (ax3).

This is with matplotlib 0.98.3 on Ubuntu 8.10. Maybe these bugs have 
been corrected in more recent versions...

Cheers.
-- 
    .~.   Yannick COPIN  (o:>*  Doctus cum libro
    /V\   Institut de physique nucleaire de Lyon (IN2P3-France)
   // \\  Lawrence Berkeley National Laboratory
  /(   )\ aim:YnCopin icq:236931013 http://snovae.in2p3.fr/ycopin/
   ^`~'^

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to