question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export custom colormaps in readable formats

See original GitHub issue

I think it would be useful to have an export=bool command on plot.Colormap. Currently, save=True just saves it to ~/.proplot/cmaps as a json that seems to be readable to just proplot. It would be great to be able to export it as an xml, hex, etc. to then import into other tools and software.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
lukelbdcommented, Oct 24, 2019

You read my mind 😃 In #57, I’m implementing all colormaps as subclasses of the matplotlib.colors.Colormap class. The subclass will add a save() method that can take optional arguments for the save format, save location, etc. Then passing save=True to plot.Colormap() will just call cmap.save(), where the default cmap.save() behavior will be to save in ~/.proplot/cmaps.

0reactions
bradyrxcommented, Oct 30, 2019

That looks great.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I Create a Customized Colormap File in ArcGIS? - Esri
This allows you to export or import CLR files. To save your colormap, click the Colormap button, and then click Export Colormap.
Read more >
Is there a way to save a custom matplotlib colorbar to use ...
I am aware of ways of loading external colormaps in matplotlib (e.g. shown here and here). From NASA GISS's Panoply documentation: Color Palette ......
Read more >
Creating Colormaps in Matplotlib
ListedColormap s store their color values in a .colors attribute. The list of colors that comprise the colormap can be directly accessed using...
Read more >
How to Export Raster with same classification colors seen in ...
When you are ready to save the color scheme, click the Colormap button and click Export a Colormap. Choose the location and name...
Read more >
How to Create a Custom Label Colormap - Xtra Library
This short video explains how to create and export a label colormap from the Segmentation Editor.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found