Skip to content

Feature request: contour that can handle curvilinear grids #796

@Gyoshi

Description

@Gyoshi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions