You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a python library called pypalettes which is very similar to what the R package paletteer does but for Python (they are in fact almost all the same palettes).
I'd like to make pypalettes work with plotnine, but I'm not sure how to do it in practice.
Are you interested? Would it be complicated to do? My library basically calls a csv and returns either a LinearSegmentedColormap or a ListedColormap (both matplotlib objects) of the chosen palette.
I like the variety and demo at the documentation site.
The core of the palettes is handled in mizani and the API is private (mizani._colors) and still in flux and may be separated into another package.
In mizani I had to move away from matplotlib colormaps mainly to remove the dependency on matplotlib. Second to have colormaps whose interface is independent of how the colormaps are created, i.e. all colormaps have both continuous and discrete palettes whether it makes sense or not.
That said, for now pypalettes can be used by getting access to the component list of colours and passing that to plotnine or mizani to create the palettes that they know how to deal with. This isn't very user friendly and as there is duplication of work, it would be best to find common ground.
I'm will not have a lot of time in the next 2 months, but I'll look at pypalettes before I do any more significant work on mizani._colors. I also need fast colour transformations and have to think about all that as well.
Repository owner locked and limited conversation to collaborators on Sep 4, 2024
Activity
has2k1 commentedon Sep 4, 2024
I like the variety and demo at the documentation site.
The core of the palettes is handled in mizani and the API is private (
mizani._colors) and still in flux and may be separated into another package.In
mizaniI had to move away from matplotlib colormaps mainly to remove the dependency on matplotlib. Second to have colormaps whose interface is independent of how the colormaps are created, i.e. all colormaps have both continuous and discrete palettes whether it makes sense or not.That said, for now
pypalettescan be used by getting access to the component list of colours and passing that to plotnine or mizani to create the palettes that they know how to deal with. This isn't very user friendly and as there is duplication of work, it would be best to find common ground.I'm will not have a lot of time in the next 2 months, but I'll look at
pypalettesbefore I do any more significant work onmizani._colors. I also need fast colour transformations and have to think about all that as well.