The following example illustrates an issue that occurs when using scatter to plot circular markers in a SubplotHost instance:
import matplotlib.pyplot as plt import mpl_toolkits.axes_grid.parasite_axes as mpltk fig = plt.figure() ax = fig.add_subplot(1,1,1) ax.scatter([0.4],[0.5], marker='x', label='crosses') ax.scatter([0.5],[0.5], marker='o', label='circles') ax.scatter([0.6],[0.5], marker='^', label='arrows') ax.set_xlim(0.,1.) ax.set_ylim(0.,1.) ax.legend() fig.savefig('test_original.png') fig = plt.figure() ax = mpltk.SubplotHost(fig, 1, 1, 1) fig.add_axes(ax) ax.scatter([0.4],[0.5], marker='x', label='crosses') ax.scatter([0.5],[0.5], marker='o', label='circles') ax.scatter([0.6],[0.5], marker='^', label='arrows') ax.set_xlim(0.,1.) ax.set_ylim(0.,1.) ax.legend() fig.savefig('test_mpl_toolkit.png')
The circular markers do not appear in the legend when using SubplotHost.
axes_grid1 : fix missing circle-type scatter plot in legend. close #81.
Merge pull request matplotlib#81 from fgoudreault/data_unittests
Activity
axes_grid1 : fix missing circle-type scatter plot in legend. close #81.
Merge pull request matplotlib#81 from fgoudreault/data_unittests