Hi all,
I've encountered the following problem when trying to use a logarithmic color
scale:
The code
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import ticker
x = np.arange(-100,105,5)
X,Y = np.meshgrid(x,x)
Z = X**2 + Y**2 + 0.1
plt.contourf(X,Y,Z.T, locator=ticker.LogLocator())
plt.colorbar()
works fine to create a contour map with logarithmic colorscale. Now I want to
refine the scaling by adding more colorlevels. Therefore I add another option
for the contourf() function, as follows:
plt.contourf(X,Y,Z.T, np.logspace(-1,5,15), locator=ticker.LogLocator())
However when I do this, all but one tick of the colorbar just vanish. What is
the reason for this and how can I fix that?
Kind regards,
Marko
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Ciosco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users