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

Feature request: contour that can handle curvilinear grids #796

Open
Gyoshi opened this issue Dec 26, 2020 · 0 comments
Open

Feature request: contour that can handle curvilinear grids #796

Gyoshi opened this issue Dec 26, 2020 · 0 comments

Comments

@Gyoshi
Copy link

Gyoshi commented Dec 26, 2020

surface currently accepts curvilinear grids. It would be nice if contour and contourf does too for plotting of parameterised values.

contours would also use VertexSurfaceLike a la #748
Similar to #675.

For example, the pyplot backend via Plots.jl does this:

import Plots; Plots.pyplot()
r1, r2 = 1.5, 1/2
r(u,v) = ((r1 + r2*cos(v))*cos(u), (r1 + r2*cos(v))*sin(u), r1/2*sin(u)+r2*sin(v)) # torus
us = vs = range(0, 2pi, length=25)
xs, ys, zs = [[pt[i] for pt in r.(us, vs')] for i in 1:3]
Plots.contourf(xs, ys, zs)

torus_example

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