Comments (7)
Sorry for missing line breaks in the code snippets above. I didn't notice the Preview pane so didn't preview my Markdown.
from cmocean.
Hi! Sorry for my delay, been traveling.
You're right that the import statement isn't currently correct. Earlier on, plots
was included in the main install, but some people preferred that it be kept separate so as to not require more packages than strictly necessary. So, plots
has been a bit separate. I did try to have multiple ways to install cmocean on conda-forge, but I wasn't able to get it to work and gave up as I recall. Here is my current thinking about your suggestions, in backward order:
Modifying the plot_gallery demonstration code on the front page to use the "from cmocean import plots" idiom. (This is widely used by other packages.)
What about just adding "plots" to the end of import cmocean:
import cmocean.plots
cmocean.plots.plot_gallery()
Making colorspacious a dependency of cmocean on conda-forge. And maybe also viscm
I would like to find more info on this. @tacaswell or @ocefpaf do you have any advice about how best to approach this? Do you think it's too much to have viscm and colorspacious required when many people won't want to use them? Is it reasonable to have options built into the conda-forge build (which was my original intent)? @ocefpaf you were nearby when I was trying to get this to work last year at SciPy and it seems like it is not trivial.
from cmocean.
The "pip install cmocean[plots]" trick does not carry over to conda, i.e. "conda install cmocean[plots]" has exactly the same effect as "conda install cmocean": it installs cmocean only.
conda does not have the concept of optional dependencies. We can either make a bulkier package with all the optional dependencies or the user should install them separately.
Making colorspacious a dependency of cmocean on conda-forge. And maybe also viscm
Looks like them are light enough to be a core dependency.
@ocefpaf you were nearby when I was trying to get this to work last year at SciPy and it seems like it is not trivial.
I don't remember but we can try and see how hard it is.
from cmocean.
This looks promising!
from cmocean.
Sorry I neglected this for so long! I'm trying to get cmocean
modernized to now.
conda does not have the concept of optional dependencies
@ocefpaf isn't that what you did in conda-forge/cmocean-feedstock#14?
from cmocean.
@ocefpaf isn't that what you did in conda-forge/cmocean-feedstock#14?
I think so. At least it is what the GitHub breadcrumbs tells me :-P
from cmocean.
I think colorspacious
is now just installed with cmocean
through conda-forge.
@hadfieldnz I'm going to close this now since I think you can get the behavior you want with
import cmocean.plots
cmocean.plots.plot_gallery()
You can reopen it for further discussion.
from cmocean.
Related Issues (20)
- Add inverting functionality? HOT 3
- Add example image for deep
- Add example image for amp
- Example hypoxia map
- Mapping between old and new cmap names? HOT 2
- Import cmocean does not import plots HOT 3
- Automatic registration of colormaps HOT 1
- cmap alteration HOT 1
- cmocean colormaps for Tableau HOT 2
- tag release HOT 4
- Some docs images HOT 3
- issue with pip install (python2) HOT 6
- landing page has no install directions... HOT 1
- Docs images
- Possible to set number of levels on colormap? HOT 2
- cmocean available in ncview (via ncmaps) HOT 1
- Future incompatibility with MPL HOT 8
- discussing the "ice" colormap HOT 10
- numpy v2.0 compatibility
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 cmocean.