Comments (4)
This is now possible with the combine_cmaps
utility. It doesn't directly allow chopping out a part of a colormap, but you could achieve this by taking two sub_cmaps to avoid the central unwanted part, and recombine them, like so:
from cmasher.utils import combine_cmaps, get_sub_cmap, view_cmap
cmap_part_0 = get_sub_cmap("cmr.fusion", 0, 0.45)
cmap_part_1 = get_sub_cmap("cmr.fusion", 0.55, 1)
new_cmap = combine_cmaps(cmap_part_0, cmap_part_1)
view_cmap(new_cmap)
In this case I removed the central 10% but apparently you would need some further tweaking.
from cmasher.
Thanks @DanielYang59 for your reply ! Indeed it seems that we now have API to support this use case so I believe this can be closed as solved in cmasher 1.8.0. Feel free to ping me if I'm understanding this wrong and the issue should be re-opened !
from cmasher.
Hmm, that shouldn't be too hard to make. I can have a look at that.
from cmasher.
Great, thanks! Looking forward to it.
from cmasher.
Related Issues (20)
- Adding stub file of cm.py HOT 3
- `view_cmap()` does not show cmap and returns: `FigureCanvasAgg is non-interactive, and thus cannot be shown` HOT 4
- Instructions for R/IDL/Matlab/DS9/etc. users HOT 6
- Circular cmaps? HOT 21
- Colormap summary table HOT 22
- I love pastel colors, it will be cool to have a pastel colormaps :) HOT 5
- Diverging white-centered colormaps with HOT 9
- eclipse divergent and other possibilities HOT 61
- Instructions on how to import CMasher colormaps into Tableau HOT 3
- Possible contribution: some sequential, some ~diverging HOT 1
- XML format HOT 3
- Is there any chance you can make this colormap for me? Thank you so much in advance. HOT 1
- Future incompatibility with MPL HOT 3
- 2D Colormaps HOT 2
- Missing "*_s" colormaps HOT 1
- Faster center transition for dark-centered diverging maps
- dutch blue and oranje diverging cmap request
- Matplotlib deprecation warnings HOT 3
- Is there a way to reverse the sequential cmasher colormaps? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmasher.