Is there any way to use the contour
and contourf
commands from the Plots.jl
package to produce figures with non-rectangular domains? Or what would be the most flexible/complete alternative?
Suppose I have the following plot in polar coordinates:
using Plots
r = 1:0.1:2
θ = 0:0.05π:0.5π
f(r,θ) = r^2+sin(θ)
contourf(r, θ, f)
How would I plot this as a quarter annulus in the Cartesian frame? I am not looking for anything specific for polar coordinates though, that’s just an example.
4 posts - 3 participants