inv.plot() error

I followed the tutorial on stationXML creation:

Then I followed the steps to read in the station.xml using read_inventory:

It looks fine and I can plot the channel response, e.g., using:
resp = cha.response
resp.plot(0.001, output=“VEL”)

However, if I try to plot the inv using inv.plot(), I get the stacktrace below.

Traceback (most recent call last):
File “/usr/local/anaconda/envs/obspy_3.6/lib/python3.6/site-packages/matplotlib/”, line 101, in _sanitize_extrema
ret = np.asscalar(ex)
File “/usr/local/anaconda/envs/obspy_3.6/lib/python3.6/site-packages/numpy/lib/”, line 480, in asscalar
return a.item()
AttributeError: ‘str’ object has no attribute ‘item’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “”, line 13, in
File “/usr/local/anaconda/envs/obspy_3.6/lib/python3.6/site-packages/obspy/core/inventory/”, line 749, in plot
title=None, show=False, fig=fig, **kwargs)
File “/usr/local/anaconda/envs/obspy_3.6/lib/python3.6/site-packages/obspy/imaging/”, line 766, in plot_map
return plot_basemap(*args, **kwargs)
File “/usr/local/anaconda/envs/obspy_3.6/lib/python3.6/site-packages/obspy/imaging/”, line 179, in plot_basemap
scal_map = ScalarMappable(norm=Normalize(min_color, max_color),
File “/usr/local/anaconda/envs/obspy_3.6/lib/python3.6/site-packages/matplotlib/”, line 892, in init
self.vmin = _sanitize_extrema(vmin)
File “/usr/local/anaconda/envs/obspy_3.6/lib/python3.6/site-packages/matplotlib/”, line 103, in _sanitize_extrema
ret = float(ex)
ValueError: could not convert string to float: ‘#b15928

Here’s my anaconda env:

python 3.6.4 0 conda-forge

obspy 1.1.0 py36_1 conda-forge
matplotlib 2.2.2 py36_0 conda-forge
numpy 1.13.3 py36ha726252_3

scipy 1.0.0 py36h1de22e9_0


Hi Mike,

this is a bug which appeared with the new matplotlib release.
It's fixed, but unfortunately not yet released.

One work-around would be to downgrade matplotlib. I think matplotlib
2.1 should be enough. (conda install matplotlib=2.1).