Git Product home page Git Product logo

cmaps's People

Contributors

hhuangwx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmaps's Issues

Only first file in CMAP_DIR is read and parser returns before registering reversed colormap.

I noticed only one of my custom .rgb files was read and that the colormap that appends '_r' isn't being added. I believe this issue occurs because the try..except is performed before changing cname, therefore cname is already registered and _parse_cmaps returns before the reverse colormap is returned. So, in file cmaps.template line 62 should be moved up above line 57.

Also, anytime there is a .rgb that happens to match an already registered colormap name it won't continue to register the rest of the .rgb files in CMAP_DIR. This may require even further modifications to the try..except.

Could not import cmaps

I've installed the cmaps, which's version is 2.0.1, and my python's version is 3.10.14. However, I'm facing the problem that I could not import it, which shows: 'ImportError: attempted relative import with no known parent package'. Is this problem because the python and cmaps versions are not compatible? How could I resolve it?

1 2

Thanks, sincerely.

Unable to import cmaps when PySide is installed

Trying to use your module. Installed cmaps from conda and tried within a single script and it worked without an issue. However, when I imported into my actual project which has PySide6 (installed from conda as well), it resulted in the following error.

import cmaps
  File "shibokensupport/signature/loader.py", line 61, in feature_imported
  File "shibokensupport/feature.py", line 135, in feature_imported
AttributeError: 'Cmaps' object has no attribute '__name__'. Did you mean: '__ne__'?

Any way to solve this issue? Or is it possible to use it without installing it?

great stuff!

Can I iterate on those color maps to print them, much like the following code works for matplotlib?

`from pylab import *
from numpy import outer

rc('text', usetex=False)
a=outer(arange(0,1,0.01),ones(10))
figure(figsize=(10,5))
subplots_adjust(top=0.8,bottom=0.05,left=0.01,right=0.99)

maps=[m for m in cm.datad if not m.endswith("_r")]
maps.sort()
l=len(maps)+1
for i, m in enumerate(maps):
subplot(1,l,i+1)
axis("off")
imshow(a,aspect='auto',cmap=get_cmap(m),origin="lower")
title(m,rotation=90,fontsize=10)
title(m,fontsize=10)
savefig("colormaps.png",dpi=300,facecolor='gray')

Pypi / Conda-forge package

Would you be willing to package cmaps into a pypi package? This would allow people to easily install the package (pip install cmaps) and would help downstream users incorporate the package as a dependency. Ideally, this would also lead to a conda-forge package too.

Perhaps @bonnland or @andersy005 would be willing to help with this.

ncmap库

您好,我是一名即将入职的天气预报员,我看了您的cmaps库,很受启发,目前对于ncl的调色板,只有您的库能够很好的移植到python上,但是依然存在一些问题,比如我想用ncl色板特定的颜色填充等值线,cmaps并不能很好的根据ncl的调色板自定义colormap,此外您的show方法仅能查看颜色,但并不能查看ncl颜色的色号,因此在您的基础上进行了改进,地址在https://github.com/liyuan3970/ncmap;使用样例和数据在example目录中(https://github.com/liyuan3970/ncmap/blob/master/example/example/example.md),期待您的参观,共同进步!!

some colorbars are missing

I try to plot using 'NEO_carb_emit_anom' and 'NEO_div_vegetation_', the results show that Cmaps has no attribute 'NEO_div_vegetation_'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.