-
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
Line width in plot #141
Comments
Hi Mikolaj, It's basically not supported any more by WebGL (vs 1 at least): import ipyvolume as ipv
import numpy as np
x = np.linspace(0, 10, 100)
y = np.sin(x)
z = np.cos(x)
ipv.figure()
p = ipv.plot(x, y, z)
p.material.linewidth = 2
ipv.show() Let me know if you get success! cheers, Maarten |
@maartenbreddels three.js r91 added code in examples for fat lines via shaders, see mrdoob/three.js#11349. I'm considering exposing it in pythreejs given its usability. |
Ah great, I saw some external libraries, but didn't know if I wanted to depend on that, if you plan to support it, I'll try to follow it. |
Thanks @maartenbreddels! I will test it. The page you linked seems to indicate that Edge browser has full support for lineWidth? That is unexpected, but I will test it out. |
On windows, I recomment using anaconda, and then install nodejs: |
As of writing this, the current hack to adjust the linewidth is the following: import ipyvolume as ipv
import numpy as np
num_pts = 1000
x = np.linspace(0, 10, num_pts)
y = np.sin(x)
z = np.cos(x)
ipv.figure()
p = ipv.plot(x, y, z)
p.material.visible = True # this is required for the following to work
p.size = 1. # adjust this number for linewidth. can also be more or less than 1.
ipv.show() This will draw the scatter points along the length of the line. The thickness of those can be adjusted. If there are a sufficient number of such points, this will give the illusion of linewidth. It will not work as well if the number of points is too few. One can experiment with |
Is it possible to set line width when using
ipyvolume.pylab.plot
? The docs do not seem to mention this and I could not find any info on this anywhere else too. If it is not supported currently inplot
- are there any hacky ways of achieving line width?The text was updated successfully, but these errors were encountered: