# Contour goes out of grid in Meshes.jl

**URL:** <https://discourse.julialang.org/t/contour-goes-out-of-grid-in-meshes-jl/112187>\
**Category:** Visualization\
**Tags:** plotting, glmakie, meshes\
**Created:** [March 27, 2024, 3:48pm UTC](https://discourse.julialang.org/t/contour-goes-out-of-grid-in-meshes-jl/112187 "2024-03-27T15:48:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [March 27, 2024, 3:48pm UTC](https://discourse.julialang.org/t/contour-goes-out-of-grid-in-meshes-jl/112187/1 "2024-03-27T15:48:06Z")

</div>

I am using Meshes.jl and GLMakie.jl for plotting on irregular grid. Contour of `psi[1,:,:]` _(red lines)_ goes out of the circular sector. I want to apply contour on this irregular grid _(circular sector)_.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/e/1e252434abd4c0dc80e71a82462c1f3ffc565887.png)

```julia
begin
	grid = StructuredGrid(x, z)
	set_theme!(backgroundcolor = :gray90)
	fig, ax, plt = Meshes.viz(grid, color=vec(rho[1,:,:]), alpha=0.8)
	contour!(plt,psi[1,:,:], levels = 0.1:0.1:1, mode = :relative, color=:red)
	contour!(plt,alfsurf[1,:,:], levels = 0.1:0.1:1, mode = :relative, color=:green)
	colsize!(fig.layout, 1, Aspect(1, 1.0))
	fig
end

```

Here `x` and `z` are 270x100 `Float32` matrices each. How to keep contour plot within circular sector mesh?
