As discussed at length elsewhere [insert links],
jet is an
empirically bad color map and should not be the default color map.
Due to the position that changing the appearance of the plot breaks
backward compatibility, this change has been put off for far longer
than it should have been. In addition to changing the default color
map we plan to take the chance to change the default color-cycle on
plots and to adopt a different color map for filled plots (
contourf, etc) and for scatter like plots.
The choice of a new color map is fertile ground to bike-shedding (“No, it should be _this_ color”) so we have a proposed set criteria (via Nathaniel Smith) to evaluate proposed color maps.
For heat-map like applications it can be desirable to cover as much of the luminence scale as possible, however when color mapping markers, having markers too close to white can be a problem. For that reason we propose using a different (but maybe related) color map to the heat map for marker-based. The design parameters are the same as above, only with a more limited luminence variation.
import numpy as np import matplotlib.pyplot as plt np.random.seed(1234) fig, (ax1, ax2) = plt.subplots(1, 2) N = 50 x = np.random.rand(N) y = np.random.rand(N) colors = np.random.rand(N) area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radiuses ax1.scatter(x, y, s=area, c=colors, alpha=0.5) X,Y = np.meshgrid(np.arange(0, 2*np.pi, .2), np.arange(0, 2*np.pi, .2)) U = np.cos(X) V = np.sin(Y) Q = ax2.quiver(X, Y, U, V, units='width') qd = np.random.rand(np.prod(X.shape)) Q.set_array(qd)
When plotting lines it is frequently desirable to plot multiple lines or artists which need to be distinguishable, but there is no inherent ordering.
import numpy as np import matplotlib.pyplot as plt fig, (ax1, ax2) = plt.subplots(1, 2) x = np.linspace(0, 1, 10) for j in range(10): ax1.plot(x, x * j) th = np.linspace(0, 2*np.pi, 1024) for j in np.linspace(0, np.pi, 10): ax2.plot(th, np.sin(th + j)) ax2.set_xlim(0, 2*np.pi)