arup-group / elara

Command line utility for processing MATSim events output files.
MIT License
13 stars 4 forks source link

remove the plotnine dependency and update related function #226

Closed syhwawa closed 1 year ago

syhwawa commented 1 year ago

Since the plotnine dependency produced multiple dependency conflicts(issue #225), and the conflict/bug is not straightforward to capture. I have changed the related plotnine functions using matplotlib instead and remove the dependency.

I think the changes affect some comparison plots like link counter comparison. The new comparison plot look like more consistent with other comparison plots since they all use matplotlib. Not sure why it used ggplot from plotnine previously but we can add plot style as 'ggplot' if we would like to.

New plot via matplotlib: link_counter_comparison_car_B_summary_normalised

old ggplot via plotnine: link_counter_comparison_car_B_summary_normalised_old

There is a quite old mode share comparison function OldModeSharesComparison based on another plot functions via plot nine. I think we are using TripModeSharesComparison to show the mode share differences instead of the old function so I just remove it.

syhwawa commented 1 year ago

Good point @andkay. I think the gridlines are useful, so I added them to the plot. examples

fredshone commented 1 year ago

Thanks for picking this up - Nice job :)