jwass / mplleaflet

Easily convert matplotlib plots from Python into interactive Leaflet web maps.
BSD 3-Clause "New" or "Revised" License
522 stars 76 forks source link

edits to iter_rings, to properly handle 'Z' and prep for other flags #56

Open abrammer opened 6 years ago

abrammer commented 6 years ago

Made some improvements (hopefully) for using this with contour plots as I had the #40 issue then had funky lines due to the #51 "fix". #51 isn't the right solution, as has been mentioned before, while it creates plots it mainly creates broken outputs as the paths become offset.

Z should draw a line back to the start and yield the path not just append and keep going.
I've added in steps draw lines across the bezier curves which I've seen mentioned in issue, these should yield the correct linear path for now and add space for the bezier curve to be added in future.

Also added a contourf "test" which will reveal that #51 doesn't properly solve the problem.

fwiw, I got an indexing method working but it seemed like just running through the list was logically simpler given the variety of SVG codes.