yt-project / widgyts

Widgets for yt
https://widgyts.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
10 stars 10 forks source link

assign a particular colormap to levels #75

Closed niruochengfeng05 closed 2 years ago

matthewturk commented 3 years ago

Hi @coconutcc ! This isn't quite what I had in mind. What I'd like to see is being able to apply a different colormap across all levels.

Right now, it's hardcoded so that for each level, the color of the grids on that level are drawn from a colormap that is normalized to the max level. i.e., if there are 10 levels, the color for levels 0, 1, 2, 3, ..., 10, are drawn from a colormap that maps 0..10 to the range 0..1 and then uses the RGBA values for the numbers in that range. This PR changes it so that level 0 is drawn from one colormap, level 1 from another, etc. But we want to change the colormap, not switch it up per level.

munkm commented 3 years ago

hi @coconutcc -- thank you so much for the PR. It's really helpful to describe what your pull request is doing and what problems it is intended to solve or what feature you're hoping to create. That way those of us reviewing your request can give more helpful feedback. Would you mind doing that, and what the expected behavior of what you're trying to implement is?