我最近用Python 3.5和其他所有东西安装了Anaconda。我来自R,用于动态安装软件包。我正在尝试通过jupyter笔记本安装名为scitools的模块。我想在jupyter中重新创建它。但是,我不知道如何动态安装软件包(如果可能)。非常感谢您的帮助。谢谢!
编辑:我正在尝试使用社区推荐的conda,但是它不起作用。我正在使用Mac OSX
我想在第一个轴的右上角添加第二个轴。谷歌搜索后,我找到了两种方法来做这样的事情:fig.add_axes(), 和mpl_toolkits.axes_grid.inset_locator.inset_axes. 但fig.add_axes()不接受transformarg。所以下面的代码会抛出一个错误。所以位置不能在父轴坐标下,而是在图形坐标下。
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
fig, ax = plt.subplots(1, 1, subplot_kw={'projection': ccrs.PlateCarree()})
ax2 = fig.add_axes([0.8, 0, 0.2, 0.2], transform=ax.transAxes, projection=ccrs.PlateCarree())
Run Code Online (Sandbox Code Playgroud)
并且inset_axes()不接受projectionarg,所以我不能添加ax2为 cartopy geo-axes。
from mpl_toolkits.axes_grid.inset_locator import inset_axes
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
fig, ax = plt.subplots(1, 1, subplot_kw={'projection': ccrs.PlateCarree()})
# The following line doesn't work
ax2 = inset_axes(ax, width='20%', height='20%', axes_kwargs={'projection': ccrs.PlateCarree()})
# Doesn't work neither:
ax2 …Run Code Online (Sandbox Code Playgroud)