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
<<attachment: missing_legend_circles.png>>
------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712
_______________________________________________ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
