lmmentel / mendeleev

A python package for accessing various properties of elements, ions and isotopes in the periodic table of elements.
https://mendeleev.readthedocs.io
MIT License
208 stars 38 forks source link

How to add color bar to the plots #127

Closed yanghan234 closed 4 months ago

yanghan234 commented 9 months ago

Dear developers,

I'm trying to plot the periodic table with my own element-wise data, and I want to add a color bar to the plot. Is there any temporary solution for this? Thank you!

lmmentel commented 9 months ago

Hey! It would be much easier to help if you provide a concrete case you're dealing with, i.e. self-contained code, reproducible code example.

Current plotting backends mendeleev uses are plotly and bokeh and plotting functions return a Figure object which can be further modified. Here's an example on how to add a colorbar to existing plotly figure.