[matplotlib-devel] Completely wrong tick formatting

2013-07-05 Thread Pål Gunnar Ellingsen
Hi

I'm having some problems with the formatter of ticks in a polar plot.
Below is a minimum example
The first figure is correct, the second has wrong ticks.

This has be tested both on 1.2.0 and the latest from git (1.4.x, commit
64cc3416396ffb2811af80fc810ed63572df71d9 )

Does anyone know whys this happens?
Is it a bug in MaxNLocator

Kind regards

Pål

---
#!/usr/bin/env python

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator

# Data
M=np.sin(np.meshgrid(np.arange(30),np.arange(30)))
M=np.squeeze(M[0,:,:])
Radius=np.arange(30)
Theta=np.arange(30)

# Plotting the correct figure
print('Correct ticks')
fig=plt.figure()
ax1 = fig.add_axes([0,0,0.8,1],projection='polar')
c = ax1.pcolormesh(Theta, Radius, M)
ax1.set_frame_on(False)
plt.xticks([])
plt.yticks([])
ax2=fig.add_axes([0.9,0.1,0.05,0.7])
cb=fig.colorbar(c,cax=ax2)
plt.show()

# Doing the same plot
print('Wrong ticks by using formatter')
fig=plt.figure()
ax1 = fig.add_axes([0,0,0.8,1],projection='polar')
c = ax1.pcolormesh(Theta, Radius, M)
ax1.set_frame_on(False)
plt.xticks([])
plt.yticks([])
ax2=fig.add_axes([0.9,0.1,0.05,0.7])
cb=fig.colorbar(c,cax=ax2)

# except now setting a limit to the number of ticks using a formatter
# which results in wrong ticks
cb.ax.yaxis.set_major_locator(MaxNLocator(3))
plt.show()
---
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] basemap installation problem with mpl master

2013-07-05 Thread Eric Firing
If I do a clean install of mpl master, and then of basemap, basemap 
lands in dist-packages/mpl_toolkits, as it always has.  But now it is 
not found--I can't import it.  It seems that now the *real* mpl_toolkits 
is cleverly hidden inside an egg directory with a monstrous name, 
leaving basemap orphaned in a directory with no __init__.py.  As a 
workaround I can symlink it into the egg location.  I suspect the real 
solution will require basemap to use setuptools, correct?  I don't know 
how to do this, so I hope someone who does will submit a PR.

Eric


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel