DingWB / PyComplexHeatmap

PyComplexHeatmap: A Python package to plot complex heatmap (clustermap)
https://dingwb.github.io/PyComplexHeatmap/
MIT License
279 stars 30 forks source link

Possible bug? 'lightgray' is not a valid color value. #51

Closed aidengk-iris closed 1 year ago

aidengk-iris commented 1 year ago

Dear PyComplexHeatmap developers,

Thank you for the great package. I can foresee that it will speedup our data analysis.

I encountered a value error when running the example from the readme: 'lightgray' is not a valid color value.

The error can be tracked back to line 13 in the colors.py file.

Since I seem to be the only one having this issue, I thought about package compatibility issues. Could it be that my matplotlib's version is not supported? I'm using matplotlib 3.8.0

Thank you for checking this issue!

Here is the complete error message:

image

DingWB commented 1 year ago

Yes, it is the issue of matplotlib version. Let me change the color 'light gray' to Hex code.

DingWB commented 1 year ago

Could you please uninstall the package using pip uninstall PyComplexHeatmap and reinstall it using pip install git+https://github.com/DingWB/PyComplexHeatmap and test whether this bug has already been fixed in matplotlib 3.8? @aidengk-iris

aidengk-iris commented 1 year ago

Thank you @DingWB for getting back to me. For some reason I failed to get requirements to build the wheel.

I'm using wheel 0.41.2 setuptools 68.2.2.

Maybe I can install an beta wheel?

image

DingWB commented 1 year ago

Sorry for the bug, please try again. It has already been fixed.

aidengk-iris commented 1 year ago

Thanks @DingWB Unfortunately matplotlib doesn't seem to recognize the hex code as well

image
DingWB commented 1 year ago

Could you please try gray, grey or other similar color? You can change the source code on your local computer and test it. Please let me know which one works.

aidengk-iris commented 1 year ago

Dear @DingWB

Thanks for the suggestions. I tried "white", "blue", "gray", "grey", "black" but none of them was recognized as a valid color value. Maybe matplotlib 3.8 deprecated some colors? I tried matplotlib 3.7.0 and all plots were fine.

DingWB commented 1 year ago

Thanks. That is weird. But you can use matplotlib 3.7 first.

aidengk-iris commented 1 year ago

Yes. I also confirm matplotlib 3.7.3 works fine. I'm closing this issue, as it seems to be a matplotlib issue. Thanks for the support!