Simulation-Decomposition / simdec-python

Sensitivity analysis using simulation decomposition
https://simdec.readthedocs.io
BSD 3-Clause "New" or "Revised" License
21 stars 0 forks source link

Wrong coloring of states in Python package #26

Closed gnopik closed 3 months ago

gnopik commented 4 months ago

An issue found by Anna in private messaging. In Python package, the order of colors from high to low states on the histogram is switched. The legend is ok: name of the states, their corresponding numeric values are fine, only the color is off on the graph. The bug does NOT appear on the dashboard.

Python: image Dashboard image

gnopik commented 4 months ago

Would be nice to update the default color palette, by the way, to match the dashboard.

tupui commented 4 months ago

Yeah so basically I do stuff like that https://github.com/Simulation-Decomposition/simdec-python/blob/82f5ef3cc524f5b60c65a6ddc99ca1409ba3a052/src/simdec/visualization.py#L256

I do things like that in this function and also on the figure part and same for the dashboard part. Basically to fix it we simply need to start with the Python side, make it as wanted. Then fix the dashboard.

For the default, I don't see more of her code so hard to say but the table function takes a list of colours.