Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Contour plots on non-rectangular domain

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles