anazalea / pySankey

create sankey diagrams with matplotlib
GNU General Public License v3.0
249 stars 95 forks source link

Use matplotlib more transparently #26

Open clbarnes opened 5 years ago

clbarnes commented 5 years ago

Matplotlib gives us a lot of flexibility in terms of plot sizes, aspect ratios, adding annotations, styling, and so on: all of which are valuable to people creating sankey diagrams. Currently, the sankey function uses a number of extra keyword arguments to ape a tiny portion of that flexibility, making it harder to read and maintain, while taking a lot of valuable power away from the user (see #22 , #19, #7).

sankey could, instead, take a matplotlib Axes object, which the user can customise to their liking, and where the user also has access to the Figure to customise. Then they can choose what to do with it - showing it, saving it with much more flexibility.

pySankey's maintainability would improve as it's doing less; users would have a lot more power.

P.S. pySankey is great! So much more usable than floweaver.