Before, chart customize 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
π Call to SetUnitSystem only if not already configured
π tests: Fix running pytest on single tests
π Parse colors into RGBA values, so "red", "#FF0000", "#FF0000FF" produce the same float repr [1., 0., 0., 1.]
π Fix #15 (avoid calls to GetRelHumFromTWetBulb if wb_t > db_t)
ποΈ 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
β‘οΈ Delimit enthalpy and volume lines calculations to only the lines inside chart limits, avoiding extra calculations and potential errors with variables out of range
β‘οΈ Delimit constant RH lines calculations to only the visible lines inside the chart, and define .rh_labels as list[int]
β‘οΈ Delimit constant WBT lines calculations, with minor refactor on 'make_constant_wet_bulb_temperature_lines' method
β‘οΈ Set initial dbt-min for sat curve crossing x-axis plot, to avoid generation of hidden curves under x-axis
π₯ Remove old hidden trick to use Agg backend
π Fix min wbt estimation around 0ΒΊC
π Fix #22 (convergence errors in iterator solver for enthalpy lines), by allowing a smaller minimal step increment, avoiding oscillation around objective
Before, chart customize 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 tochart.save()
,chart.make_svg()
, orchart.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
chart.make_svg()
as the recommended method to generate SVGsChartFigure.dpi
to chart config, for easy customization of matplotlib Figure DPI.rh_labels
as list[int]