Closed gillins closed 3 years ago
No - it's a carryover from TuiView where the different types of ramps are grouped separately in the GUI. Probably not ideal here, but I'm keen to keep this as close to the TuiView version to make life easier. The code to create the Python code for ramp is actually part of TuiView...
I'm happy to leave this in so anyone reading the code can easily tell what type of ramp is which.
re: 'type' - no worries, sounds fair.
Just for future reference, the TuiView script that takes the .csv file from https://colorbrewer2.org and creates some Python code is https://github.com/ubarsc/tuiview/blob/master/colorbrewer2py.py. There is a request for a citation which (I think) I have done by having it attached to each ramp in the code. This script is a bit basic and creates dictionaries based on the format of this .csv.
At some stage the viridis family was also added (https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html) which doesn't seem to have a citation requirement.
I'd also note the TuiView implementation has the ability to read supplementary color ramps provided by the user from a file if the TUIVIEW_EXTRA_RAMP
env var is set. I don't think RIOS needs to have this because of the user script can call the function added in this PR.
I suspect this all could have been done in a more tidy fashion, happy to take suggestions.
Seems users might want to add their own color tables...
ping: @petescarth