Repository: obspy/obspy

Issue:
Plotting of small island coastlines with inventory.plot() and catalog.plot()
ObsPy version 1.1.1; Python version: 3.7; Platform: OSX; installed using anaconda

I am making maps of earthquake epicentres and station locations for the Eastern Caribbean region using catalog.plot() and inventory.plot() respectively. Even though I have tried setting the map resolution to "h" and "f", many of the Lesser Antilles islands are not being plotted (only 2 out of the 10+ islands in the region are shown):
```
from obspy import read_inventory
inv = read_inventory("XX.xml")
inv.plot(projection="local", resolution="f", method="basemap", show=True)
```
![image](https://user-images.githubusercontent.com/25796081/66199197-08e1a800-e696-11e9-929b-ac29d22f3f44.png)

I thought that this was an issue with the Basemap package, but when I run the following code, the map plots as it should and all islands show up:
```
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
fig = plt.figure(figsize=(10,10))
map = Basemap(llcrnrlon=-65,llcrnrlat=10,urcrnrlon=-55.,urcrnrlat=20.,
             resolution='h', projection='tmerc', lat_0 = 16, lon_0 = -60)
map.drawmapboundary(fill_color='aqua')
map.fillcontinents(color='coral',lake_color='aqua')
map.drawcoastlines()
plt.show()
```
![image](https://user-images.githubusercontent.com/25796081/66199427-7b528800-e696-11e9-8d5b-4d81840a5c84.png)

So it seems like this is an issue with how ObsPy is calling Basemap.

I have attached the corresponding STATIONXML file (zipped up) for reproducing this issue:
[XX.xml.zip](https://github.com/obspy/obspy/files/3690016/XX.xml.zip)



Discussion:
Things like that are usually bugs in how basemap determines which shapes are in the plot region.. not sure what is going wrong here.. you could try to set up the map yourself, though, as a workaround

```python
map = ...
fig.bmap = map
inv.plot(..., fig=fig)
```

this is what obspy does under the hood, do the island show up using:

```python

bmap = Basemap(projection='aea',
                           resolution=_BASEMAP_RESOLUTIONS[resolution],
                           area_thresh=1000.0, lat_0=round(lat_0, 4),
                           lon_0=round(lon_0, 4),
                           width=width, height=height, ax=ax)

```
?
Could the ``area_thresh`` be the culprit?

``
area_thresh | coastline or lake with an area smaller than area_thresh in km^2 will not be plotted. Default 10000,1000,100,10,1 for resolution c, l, i, h, f.
``
Hi Tom - got there just before me!
Yes, it seems like `area_thresh` is the culprit here - it is hard-coded to be set to 1000.0 km^2 for all projection types. Can we please remove `area_thresh` in the Basemap commands for all projection types so that Basemap can just choose itself based on the given `resolution` value?

Here is the result as it should be once I removed `area_thresh` from plot_basemap:
![image](https://user-images.githubusercontent.com/25796081/66201186-a63edb00-e69a-11e9-9f7b-38aca59a9b8f.png)

in the meantime, ``cartopy`` is your friend :)
Like mentioned above you can set up the basemap and feed it into the inventory/catalog plots.
Yep, I realise that's a fix, but thought it might be worthwhile making the small `area_thresh` change ... I was giving an ObsPy introduction to seismology colleagues in the Caribbean last week - demonstrating how to make simple maps using `inventory.plot` & `catalog.plot` without going into deeper stuff like matplotlib, and it was on first impressions a bit strange to everyone why all the islands weren't appearing! 
Oh, I see now. Yeah, I don't know why we force `area_thresh`, seems like a really bad idea considering basemap controls it using the `resolution` setting by default.

Resolving patch:
diff --git a/obspy/imaging/maps.py b/obspy/imaging/maps.py
--- a/obspy/imaging/maps.py
+++ b/obspy/imaging/maps.py
@@ -345,7 +345,7 @@ def _plot_basemap_into_axes(
         elif projection == 'ortho':
             bmap = Basemap(projection='ortho',
                            resolution=_BASEMAP_RESOLUTIONS[resolution],
-                           area_thresh=1000.0, lat_0=round(np.mean(lats), 4),
+                           lat_0=round(np.mean(lats), 4),
                            lon_0=round(mean_longitude(lons), 4), ax=ax)
         elif projection == 'local':
             if min(lons) < -150 and max(lons) > 150:
@@ -383,7 +383,7 @@ def _plot_basemap_into_axes(
 
             bmap = Basemap(projection='aea',
                            resolution=_BASEMAP_RESOLUTIONS[resolution],
-                           area_thresh=1000.0, lat_0=round(lat_0, 4),
+                           lat_0=round(lat_0, 4),
                            lon_0=round(lon_0, 4),
                            width=width, height=height, ax=ax)
             # not most elegant way to calculate some round lats/lons


Test patch:
diff --git a/obspy/core/tests/images/network_location-basemap2.png b/obspy/core/tests/images/network_location-basemap2.png
Binary files a/obspy/core/tests/images/network_location-basemap2.png and b/obspy/core/tests/images/network_location-basemap2.png differ