Skip to content

✨ Chart config auto-refresh + bugfixes πŸ›

Compare
Choose a tag to compare
@azogue azogue released this 09 Jun 17:53
· 96 commits to master since this release
2f36515

Before, chart customization was done by creating a new Psychrochart object based on some modified chart configuration,
so creating custom plots, or even changing chart limits, was challenging πŸ˜“

Now, when chart.config changes, any call to chart.save(), chart.make_svg(), or chart.plot()
will regenerate the chart data (limits, enabled curves, styling, etc.) before plotting, with only the visible curves inside limits,
(no more 0-size artifacts in SVGs, and most errors because some var is out of range should be gone now 🀞)

Changes

  • ♻️ Update example notebook with API changes, and using chart.make_svg() as the recommended method to generate SVGs
  • πŸ’„ Parse colors into RGBA values, so "red", "#FF0000", "#FF0000FF" produce the same float repr [1., 0., 0., 1.]
  • πŸ—οΈ Add mutation control for configuration models, and use it to check if there is any config change before creating a chart, triggering a chart-data regeneration if necessary
  • πŸ”§ Add new field ChartFigure.dpi to chart config, for easy customization of matplotlib Figure DPI
  • ⚑️ Optimize generation of psychrometric curves inside plot limits
  • πŸ› Fix convergence and var-out-of-range errors
  • πŸ’₯ Remove plotting methods from PsychroCurve/PsychroCurves for a more functional approach, using methods in plot_logic.py
  • πŸ’₯ Add PsychroCurve.internal_value field, to identify the trigger value for each curve (constant H/V/RH...), and evolve validation of data arrays
  • βœ… tests: Increase test coverage and optimize tests for faster run (~2x)
  • πŸ“¦οΈ env: Add slugify to deps and bump version