plotting shape file in ggplot2
<p>I'm trying to figure out how to display my complete map in gglot2 including the island Both r_base and tmap were able to display the islands but ggplot2 couldn't differentiate the island from the rest of the waterbody...
 <a href="https://i.stack.imgur.com/WyrO0.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/WyrO0.jpg" alt="enter image description here"></a>.</p>

<p>My question is how to make the Islands appear in ggplot2?</p>

<p>See the code  i used below.</p>

<pre><code>library(ggplot2)
library (rgdal)
library (rgeos)
library(maptools)
library(tmap)
</code></pre>

<h2>Loading the Persian Gulf shape fill referred to as iho</h2>

<p><code>PG &lt;- readShapePoly("iho.shp")</code></p>

<h1>the shape file is available here</h1>

<p><a href="http://geo.vliz.be:80/geoserver/wfs?request=getfeature&amp;service=wfs&amp;version=1.0.0&amp;typename=MarineRegions:iho&amp;outputformat=SHAPE-ZIP&amp;filter=%3CPropertyIsEqualTo%3E%3CPropertyName%3Eid%3C%2FPropertyName%3E%3CLiteral%3E41%3C%2FLiteral%3E%3C%2FPropertyIsEqualTo%3E" rel="noreferrer">http://geo.vliz.be:80/geoserver/wfs?request=getfeature&amp;service=wfs&amp;version=1.0.0&amp;typename=MarineRegions:iho&amp;outputformat=SHAPE-ZIP&amp;filter=%3CPropertyIsEqualTo%3E%3CPropertyName%3Eid%3C%2FPropertyName%3E%3CLiteral%3E41%3C%2FLiteral%3E%3C%2FPropertyIsEqualTo%3E</a></p>

<h1>plot with r_base</h1>

<p><code>Q&lt;-plot(PG)</code></p>

<p>Corresponds to figure A</p>

<h2>Ploting with tmap</h2>

<p><code>qtm(PG)</code> </p>

<p>Corresponds to figure B</p>

<h1>convert to dataframe</h1>

<p><code>AG &lt;- fortify(PG)</code></p>

<h1>Plot with ggplot2</h1>

<p><code>ggplot()+ geom_polygon(data=AG, aes(long, lat, group = group), 
colour = alpha("darkred", 1/2), size = 0.7, fill = 'skyblue', alpha = .3)</code> </p>

<p>Corresponds to figure C</p>