Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

colormap generalization #18809

Closed as not planned
Closed as not planned
@rwijtvliet

Description

@rwijtvliet

Problem

The current implementation of colormaps maps a 1D float interval onto a 1D color spectrum. Meaning, I can use a colormap to find the color that 'matches' asingle float value.

Sometimes, however, I'd like to get the color that matches apair ortriplet of float values.

A use case: coloring locations on a city map, where the color for each location is calculated from 2 values: the time needed to get there by car, and the time needed to get there by public transport. Or, from 3 values, if the time needed to get there by bike is also included. In that case, the color could be picked from a color triangle likethis one.

Proposed Solution

I ran into this problem and created a solution here:https://github.com/rwijtvliet/interpol.

Now, please note I've only created this for myself and probably needs a lot of work to be able to get merged intomatplotlib. For example, there is no unit tests whatsoever.

Proposed Way Forward

  1. A core developer has a look a the linked project to check out, what I mean, and to judge if this is something thematplotlib package would actually benefit from including. (The examples at the ends of the sectionsColorMap2 andColorMap3 in the readme are the best places to start to get an idea of what I mean.)
  2. If yes, someone probably has some suggestions regarding how to start on a PR for this feature. I'd gladly help to get this included into the project, but my coding skills are insufficient to do this without by myself.

But let's first see if this is deemed of interest. :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp