-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color and size per glyph #8
Comments
I agree and started to implement it. |
Hey, I'm trying to plot a 3D scatter with colorscale. Something like this : I am using A trivial code which follows the idea that I'm using to achieve the above shown image. import ipyvolume.pylab as p3
import numpy as np
#points
x = np.arange(10)
y = np.arange(10)
z = np.arange(10)
#colors
#For each point x,y,z the color corresponding to the same index in c should be used
c = np.arange(10).astype('float64')/10
p3.clear()
p3.scatter(x, y, z, color=np.meshgrid(range(3),c)[1], size=3)
p3.show() Can I directly use Any help is appreciated, thanks :-) |
Hi, maybe #12 would have been useful, but otherwise the code below might help. The idea is to use a matplotlib colormap, that maps to rgb(a) values. import ipyvolume.pylab as p3
import numpy as np
import matplotlib.cm
#points
x = np.arange(10)
y = np.arange(10)
z = np.arange(10)
#colors
colormap = matplotlib.cm.viridis
c = colormap(np.linspace(0, 1, len(x)))
p3.clear()
p3.scatter(x, y, z, color=c, size=3)
p3.show() Hope this helps, let me know! cheers, Maarten |
Hey! This works just fine :) Yes, I should have looked at #12 Since I probably cannot use Thanks a lot! Although I'm new to this, it's quite simple to use and integrates really well with ipywidgets as compared to matplotlib. Awesome stuff :-) |
Hi, thanks! cheers, Maarten |
This is great!
Feature request for scatter plots: would be fantastic if you could set the color and size of each glyph individually, for visualization of multidimensional scientific data.
The text was updated successfully, but these errors were encountered: