title: How to make contour lines graph which colored only certain region?
body: <p>I have a raster data and wants to make contour graph similar to the this question <a href="https://stackoverflow.com/questions/71763003/how-to-plot-the-shapefile-via-ggplot2/71795932#71795932">enter link description here</a>. I got the code from here. But I want to highlight (colour) the
  regions which is above 75 percentile and remaining by the simple lines that are shown in picture below. <strong>I copied the code from the the above link</strong></p>
  <p><a href="https://i.stack.imgur.com/VUxX4.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>Code is folowing</p>
  <pre><code>library(raster)
  library(sf)
  library(sp)
  
  r &lt;- raster(t((volcano[,ncol(volcano):1] - 94) * 4.95))
  </code></pre>
  <h2>Let's mock with shapefile</h2>
  <pre><code>poly &lt;- st_as_sfc(st_bbox(st_as_sf(rasterToPolygons(r))))
  </code></pre>
  <p>set.seed(3456)</p>
  <pre><code>sample &lt;- st_sample(poly, 4)
  sample &lt;- st_buffer(sample, c(0.01, 0.02, 0.03))
  sample &lt;- st_sf(x=1:4, sample)
  st_write(sample, &quot;1aa.shp&quot;, append = FALSE)
  
   library(raster)
   library(sf)
  
   r &lt;- raster(t((volcano[,ncol(volcano):1] - 94) * 4.95))
  </code></pre>
  <h2>Use sf!!</h2>
  <pre><code> pg &lt;- st_read(&quot;1aa.shp&quot;) # loadshapfile 
   plot(r)
   plot(st_geometry(pg), add= TRUE,) 
  </code></pre>
  <p>#Now work with geom_sf() on your pg object:</p>
  <pre><code>centile90 &lt;- quantile(r, 0.90)
  df &lt;- as.data.frame(as(r, &quot;SpatialPixelsDataFrame&quot;))
  colnames(df) &lt;- c(&quot;value&quot;, &quot;x&quot;, &quot;y&quot;)
  
  library(ggplot2)
  
  mybreaks &lt;- seq(0, 500, 50)
  
  ggplot(df, aes(x, y, z = value)) +
   geom_contour_filled(breaks = mybreaks) +
   geom_contour(breaks = centile90, colour = &quot;pink&quot;,
             size = 0.5) +
  
   geom_sf(data=pg, fill=&quot;black&quot;, inherit.aes = FALSE) +
   scale_fill_manual(values = hcl.colors(length(mybreaks)-1, &quot;Zissou1&quot;, rev = FALSE)) +
   scale_x_continuous(expand = c(0, 0)) +
    scale_y_continuous(expand = c(0, 0)) +
   theme_classic() +
   theme()
  </code></pre>
  <p>I just want to make the picture which is highlighted only the region which is above 75 percentile by this code.</p>