From: Benjamin R. <ben...@ou...> - 2012-10-10 02:38:11
|
On Tuesday, October 9, 2012, Mike Kaufman wrote: > 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 > > > I'd +1 that MEP. Though, a place where it might not makes sense is bar charts. Something to think about. Ben Root |