From: Mike K. <mc...@gm...> - 2012-10-10 02:29:57
|
On 10/9/12 9:42 PM, Eric Firing wrote: > On 2012/10/09 3:03 PM, Mike Kaufman wrote: >> clf() >> x = arange(10) >> subplot(211) >> plot(x, x) >> tick_params(right='off') # works. >> >> subplot(212) >> semilogy(x, x) >> tick_params(right='off') # doesn't work! >> draw() > > > You need to specify an additional kwarg, which='both'. The default is > "major" only, but log axes use minor and major ticks. You are so right. And now that I think about it, this has bitten me (and been solved by me) before. And I think the reason has got to be that the regular plot simply doesn't have any minor ticks by default. That's bugged me because (correct me if I'm wrong) many of our competitors' (e.g. Matlab, IDL) plots do have minor ticks as a default. What do you think about changing the default of tick_params to 'both', and perhaps add minor ticks (I suggest a single minor between each major) to regular plots as a default? M |