Using matplotlib.pyplot I create a scatter plot using two symbols, an open circle, and a filled circle. The legend for this plot shows both labels, but there is no symbol for the open circles (see missing_legend_circles.png). Switching to matplotlib.pylab yields the same result. However, from an “ipython --pylab” session the open circles are displayed in the legend. This has me more baffled than usual. Here’s the code to reproduce the enclosed figure:
import matplotlib.pyplot as plt
fig = plt.figure()
plot = fig.add_subplot(111)
plot.scatter([1, 2, 3], [4, 5, 6], c = [0.2, 0.4, 0.6], label = ‘one’,
cmap = 'jet', marker = 'o', edgecolor = 'face')
plot.scatter([1, 2, 3], [7, 6, 5], c = [0.2, 0.4, 0.6], label = ‘two’,
cmap = ‘jet’, marker = ‘o’, edgecolor = ‘face’,
facecolor = 'none')
plot.legend()
plt.show()
This is with matplotlib 1.1 and 1.2 on Windows 7 with the TkAgg, WxAgg and WX backends.
Thank you for any help.
– Joe Louderback