# How avoid this Warning when I use Contour

**URL:** <https://discourse.julialang.org/t/how-avoid-this-warning-when-i-use-contour/61327>\
**Category:** General Usage\
**Tags:** plots\
**Created:** [May 17, 2021, 9:34pm UTC](https://discourse.julialang.org/t/how-avoid-this-warning-when-i-use-contour/61327 "2021-05-17T21:34:03Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [May 27, 2021, 12:08am UTC](https://discourse.julialang.org/t/how-avoid-this-warning-when-i-use-contour/61327/18 "2021-05-27T00:08:40Z")

</div>

For the x-y plane region meeting last condition:

```julia
using Plots;gr()

f(x,y) = x + y - 2
g(x,y) = x - y - 1

θ(x,y) = (f(x,y) < 10) & (g(x,y) < 20 ) ? 1 : NaN

x = y = LinRange(-30,30,1000)
heatmap(x,y,θ, c=:lightblue, legend=false, ratio=1, xlims=extrema(x),ylims=extrema(y))

```

 ![intersection_001](https://global.discourse-cdn.com/julialang/original/3X/0/5/05e6c2f376ba1d0caae22ffefb9cfbdaab6296b9.png)

This other way displays the boundary too:

```julia
using Colors, Plots;gr()

f(x,y) = x + y - 2
g(x,y) = x - y - 1

θ(x,y) = (f(x,y) < 10) & (g(x,y) < 20 ) ? 1 : -1

x = y = LinRange(-30,30,1000)
Plots.contourf(x,y,θ, c = palette([:white,:lightblue]), legend=false,ratio=1, xlims=extrema(x),ylims=extrema(y))
Plots.contour!(x,y,θ, c=:red, lw=2,levels=[0])

```

 ![intersection2](https://global.discourse-cdn.com/julialang/original/3X/3/5/356786d9162ccb05efc1b40db57a2a293d347e0c.png)

---

_[View the full topic](https://discourse.julialang.org/t/how-avoid-this-warning-when-i-use-contour/61327)._
