joferkington / mplstereonet

Stereonets for matplotlib
MIT License
189 stars 66 forks source link

Skip interpolation for paths that request no interpolation #25

Closed joferkington closed 6 years ago

joferkington commented 6 years ago

At some point Line2D instances started drawing markers for interpolated vertices as well as original vertices. With matplotlib 3.0, this leads to issues similar to:

import matplotlib.pyplot as plt
import mplstereonet

fig, ax = mplstereonet.subplots()
ax.pole([315, 120], [40, 20], 'bo')
plt.show()

wrong_points

With this PR applied, we'd get the expected result: correct_two_points

We've always interpolated the paths, so previously the interpolated points were just hidden. The key change that made this start showing up appears to be that Line2D instances are rendered with markers at every interpolated vertex instead of every interpolated vertex.

Note that this same issue currently exists for all core matplotlib Hammer/Molleweide/etc geo axes, as well. I should get a PR/issue into core matplotlib to update the various geo axes examples.