Skip to content

Palettes for plotnine #865

Closed
Closed

Description

@JosephBARBIERDARNAL

Hi!

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.

Activity

  1. has2k1 commented on Sep 4, 2024

    @has2k1
    Owner

    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.

  2. Repository owner locked and limited conversation to collaborators on Sep 4, 2024
  3. converted this issue into a discussion #870 on Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions