Neal Becker, on 2011-01-05 08:19,  wrote:
> I want to plot semilogy with major and minor grid.  I tried:
> 
> plt.grid(which='both')
> 
> But 2 problems:
> 
> 1) For semilogy, most of my viewers will expect to see 10 minor
> ticks/major tick.  I got 5.  How do I change it?

Hi Neal,

odd, it works here. (See attached image)

In [1]: plt.semilogy(((np.random.rand(50)*9+1)))

If your problem persists, can you provide a small example where
this does not work?  You might check the minor locator -  make
sure that it is base 10

In [2]: plt.gca().yaxis.minor.locator._base
Out[2]: 10.0

> 2) I'd like the major ticks to be solid lines, and minor ticks
> to be dashed.  I got all dashed.

In [3]: plt.grid(which='major', linestyle='solid')
In [4]: plt.grid(which='minor', linestyle='dashed')

-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 

<<attachment: logticks.png>>

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to