Comments (4)
In the first example, replace size by 10. Initially, size (or s argument) was a fraction of the box size, but since humans aren't that good with numbers between 0 and 1, I switched to percentages, so 100 is the size of the box/volume, 10 is 10% of it. It will be in the changelog for the next release, sorry for this, that's the fate of early adopters I'm afraid ;). For the 2nd example it's the same, try removing the /10. Also, i'm not adopting matplotlib's short argument names (s versus size), since we have tab-completion in the notebook, and that leads to more readable code.
I'm working on examples, stay tuned for the next release.
I agree with you on the colormap.
What is planned for color is these options:
- shape is 0 dim, and it's a string, interpret as color
- shape is 1 dim, items are strings, seperate color for each item
- shape is 2 dim, items are strings, sequence of the above
- no color scale / colormap is set
- shape is 1 dim, items are floats, it should be of length 3 -> rgb values (possibly later 4 for opacity)
- shape is 2 dim, items are float, it should be of shape (len(x), 3) -> rgb values
- shape is 3 dim, items are float, it should be (sequence_length, len(x), 3) -> rgb values
- color scale / colormap is set
- shape is 0 dim, item if float, use the colorscale to map to color
- shape is 1 dim, it's a seperate color for each item
- shape is 2 dim, again a sequence
without having a default colormap/colorscale, it will try to interpret it as rgb values, when a colorscale is set, it will use that. For now you have to use matplotlib's colormaps directly (opacity is ignored):
import ipyvolume
import matplotlib.cm
x = np.array([1,2,3,4,5])
y = np.array([2,4,3,2,1])
z = np.array([9,8,3,4,1])
c = matplotlib.cm.afmhot(np.linspace(0, 1, len(x)))
ipyvolume.quickscatter(x, y, z, color=c, size=10, marker="sphere")
I'd like to delay colormap/colorscale in ipyvolume until jupyter-widgets/ipywidgets#1153 takes more shape.
Let me know if this answer your questions.
from ipyvolume.
I think both cases were fixed in the last commit
Also try setting the size to 1, because apparently 0.1 is quite small.
from ipyvolume.
Thanks - it works!
from ipyvolume.
👍 for letting me know
from ipyvolume.
Related Issues (20)
- Error in JupyterLab HOT 1
- Creating movie from 3D Arrays
- Ambient lighting example in documentation no longer works
- 404 GET Errors When Trying to Run ipyvolume on Jupyter Notebook HOT 6
- Developer installation HOT 4
- 3D bar chart ? HOT 1
- Update @jupyterlab/builder for better metadata, fewer deps
- Ipyvolume cannot be imported in Jupyterlite: KeyError: 'emscripten' HOT 3
- Multi volume imaging example not working on 0.6.0 HOT 1
- quickvolshow and showvol crashes on VS Code HOT 3
- type object 'DataImage' has no attribute '_instance_inits' when importing ipyvolume HOT 3
- accept python lists in pylab.plot (not only numpy)
- Some frames are empty in animated scatter HOT 1
- Failed to create view for 'ScatterView' from module 'ipyvolume' with model 'ScatterModel' from module 'ipyvolume' undefined HOT 1
- Plots not rendering in Google Colab HOT 3
- Error when changing Camera HOT 2
- Syntaxis error in widgets.py: HOT 2
- Volshow and Scatter plot issues HOT 5
- partially initialized module 'ipyvolume' has no attribute '_version' (most likely due to a circular import) HOT 1
- Blank display when k3d is installed in the same environment
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 ipyvolume.