Skip to content
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

[FR] zcolor specifictation surfaces #3035

Closed
rrhiemstra opened this issue Oct 5, 2020 · 2 comments
Closed

[FR] zcolor specifictation surfaces #3035

rrhiemstra opened this issue Oct 5, 2020 · 2 comments

Comments

@rrhiemstra
Copy link

zcolor specification seems to not be implemented, although I have the recollection that it used to be in Plots around 2016.

using Plots
plotly() # or pyplot() - gr() does not work

X(r,theta,phi) = r * sin(theta) * sin(phi)
Y(r,theta,phi) = r * sin(theta) * cos(phi)
Z(r,theta,phi) = r * cos(theta)

thetas = range(0, stop=pi,   length=50)
phis   = range(0, stop=pi/2, length=50)

xs = [X(1, theta, phi) for theta in thetas, phi in phis] 
ys = [Y(1, theta, phi) for theta in thetas, phi in phis]
zs = [Z(1, theta, phi) for theta in thetas, phi in phis]
zc = sqrt.(xs.^2 .+ ys.^2 .+ zs.^2) 

surface(xs, ys, zs, zcolor=zc,
    seriestype=:surface, 
    aspect_ratio=:equal)

surface

@BoundaryValueProblems
Copy link
Contributor

How about using fill_z instead of zcolor?

@BeastyBlacksmith
Copy link
Member

zcolor is an alias for marker_z and thus only works for points

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants