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

parametrized surface and surfacecolor / fill_z #445

Open
dorn-gerhard opened this issue Jan 21, 2022 · 0 comments
Open

parametrized surface and surfacecolor / fill_z #445

dorn-gerhard opened this issue Jan 21, 2022 · 0 comments

Comments

@dorn-gerhard
Copy link

dorn-gerhard commented Jan 21, 2022

I would like to plot a parametrized surface (like a torus)
[u,v] -> [x,y,z]
coloring the surface according to another function
[u,v] -> c

I tried surface(x, y, z, fill_z = c) but the fill_z argument is ignored.

Compare https://plotly.com/julia/3d-surface-plots/#setting-the-surface-color

It's interesting to observe that fill_z also can throw an error when using
vectors for x and y and a matrix z of dimensions length(x) times length(y) or a function:
x = range(-3, 3, length=30)
surface(x, x, (x,y) -> exp(-x^2-y^2), fill_z = x * ones(size(x))' )

I also tried the display_option feature in the documentation
which seems to work for x, y parametrized surfaces (x,y)->z only
e.g. using a light source:
surface(x,x, (x,y) -> exp(-x^2-y^2), display_option=6)
Here I couldn't figure out the syntax to adopt the surface color individually (option 4 or 5?).

Maybe there is a best practise to color parametrized surfaces individually

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

1 participant