Cartopy 0.17.0:当我设置central_longitude时,我不知道如何准确设置提供的范围:
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
projection = ccrs.PlateCarree(central_longitude=180)
ax = plt.axes(projection=projection)
ax.coastlines()
ax.set_extent((-120, 120, -45, 45), crs=ccrs.PlateCarree())
ax.gridlines(draw_labels=True, crs=ccrs.PlateCarree())
Run Code Online (Sandbox Code Playgroud)
这正确地划分了纬度子集:
这正确地划分了经度子集,但有额外的标签:
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
projection = ccrs.PlateCarree(central_longitude=180)
ax = plt.axes(projection=projection)
ax.coastlines()
ax.set_extent((-120, 120, -45, 45))
ax.gridlines(draw_labels=True, crs=ccrs.PlateCarree())
Run Code Online (Sandbox Code Playgroud)
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
projection = ccrs.PlateCarree(central_longitude=180)
ax = plt.axes(projection=projection)
ax.coastlines()
ax.set_extent((-120, 120, -45, 45), crs=projection)
ax.gridlines(draw_labels=True, crs=ccrs.PlateCarree())
Run Code Online (Sandbox Code Playgroud)
当我尝试输入自己的代码时...
在较早的单元格中...
ticker = FixedTicker(ticks=range(0, 10))
Run Code Online (Sandbox Code Playgroud)
在以下单元格中...
%%opts HeatMap [colorbar=True colorbar_opts={'ticker': ticker}]
Run Code Online (Sandbox Code Playgroud)
我知道了
TypeError [Call holoviews.ipython.show_traceback() for details]
MetaModel object got multiple values for keyword argument 'ticker'
Run Code Online (Sandbox Code Playgroud)
这是回溯...
File "/Users/ahuang11/anaconda3/envs/tf/lib/python3.6/site-packages/holoviews/plotting/bokeh/element.py", line 757, in _init_glyphs
renderer, glyph = self._init_glyph(plot, mapping, properties)
File "/Users/ahuang11/anaconda3/envs/tf/lib/python3.6/site-packages/holoviews/plotting/bokeh/element.py", line 1201, in _init_glyph
self._draw_colorbar(plot, self.handles['color_mapper'])
File "/Users/ahuang11/anaconda3/envs/tf/lib/python3.6/site-packages/holoviews/plotting/bokeh/element.py", line 1100, in _draw_colorbar
**dict(opts, **self.colorbar_opts))
TypeError: MetaModel object got multiple values for keyword argument 'ticker'
Run Code Online (Sandbox Code Playgroud)