I am trying to plot a city shapefile with matplotlib's plt.plot()-function. However, within the closed areas I occasionally have small "islands" which lie within the city but not part of it. Therefore I have a solid line connecting one part to "island" as can be seen in the red area:
Any idea how I can prevent this from happening?
Update:
The points for the coloured area looks like this: https://textuploader.com/1kv27 (full shape-data can be downloaded here: https://www.suche-postleitzahl.org/download_files/public/plz-gebiete.shp.zip)
and is plotted with
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.gca()
x = [i[0] for i in points][:]
y = [i[1] for i in points][:]
ax.plot(x, y, 'k')
I do face the same problem when I want to plot a state which has islands, the islands will be connected to the mainland with a line.