Hello all,
I'm trying to use the shadedrelief() method to paint the background
of a scatter plot, but it fails. The lines below are a minimal
working example:
`In [1]: from mpl_toolkits.basemap import Basemap``
`` In [2]: world_map = Basemap(projection='cyl',
llcrnrlat=-70., urcrnrlat=85., llcrnrlon=-180., urcrnrlon=180.,
resolution=‘l’)``
``In [3]: world_map.shadedrelief()``
``---------------------------------------------------------------------------``
`` IndexError Traceback (most
recent call last)``
``<ipython-input-3-2f6045a33141> in <module>()``
``----> 1 world_map.shadedrelief()``
``
`` /usr/local/lib/python2.7/dist-packages/mpl_toolkits/basemap/__init__.pyc
in shadedrelief(self, ax, scale, **kwargs)``
`` 3997 return
self.warpimage(image=‘shadedrelief’,ax=ax,scale=scale,**kwargs)``
`` 3998 else:``
`` -> 3999 return
self.warpimage(image=‘shadedrelief’,scale=scale,**kwargs)``
`` 4000 ``
`` 4001 def etopo(self,ax=None,scale=None,**kwargs):``
``
`` /usr/local/lib/python2.7/dist-packages/mpl_toolkits/basemap/__init__.pyc
in warpimage(self, image, scale, **kwargs)``
`` 4115 # any range of longitudes may be
plotted on a world map.``
`` 4116 self._bm_lons = \``
`` -> 4117
np.concatenate((self._bm_lons,self._bm_lons+360),1)``
`` 4118 self._bm_rgba = \``
`` 4119
np.concatenate((self._bm_rgba,self._bm_rgba),1)``
``
``IndexError: axis 1 out of bounds [0, 1)`
Anyone seen this error before? I'm using python 2.7.6, numpy 1.10.4,
matplotlib 1.5.1 and basemap 1.0.7. The latter three were downloaded
as source archives and installed using ‘python setup.py install’.
Thanks,
Sourish
···
–
Q: What if you strapped C4 to a boomerang? Could this be an
effective weapon, or would it be as stupid as it sounds?
A: Aerodynamics aside, I’m curious what tactical advantage
you’re expecting to gain by having the high explosive fly back at
you if it misses the target.