miranov25 / RootInteractive

5 stars 12 forks source link

Change interface for palettes to be more consistent #279

Closed pl0xz0rz closed 1 year ago

pl0xz0rz commented 1 year ago

Previously, the interface for palettes was inconsistent - the "colors" argument took a string that encoded the palette's name, while the "palette" argument took an array that was the palette itsef. With this PR, both interfaces work for both palettes. This PR also fixes a missing import math statement in test_bokehDrawSA.py that got there by some chain of transitive star imports and changes the default palette to kBird256 #278

miranov25 commented 1 year ago

Unit test OK:

------------------------------------------------------------------------------------------------ JSON report ------------------------------------------------------------
------------------------------------
report saved to: test6.json
====================================================================================== 37 passed, 7 warnings in 53.54s ======================================================================================

real    0m54.900s
user    12m54.504s
sys     0m45.940s
miranov25 commented 1 year ago

Working well also for the real use case: file:///lustre/alice/users/miranov/NOTES/alice-tpc-notes2/JIRA/ATO-614/dEdxWithGasGain.html

Checking the Root palettes I would like to enable also Rainbow - my favorite.

https://root.cern.ch/doc/master/classTColor.html

image

miranov25 commented 1 year ago

I am merging. We can ask Berkin to implement also kRainbow