In [1]:
%matplotlib inline
import yt
from matplotlib import pyplot as plt
In [2]:
fig2 = plt.figure()
ax2 = fig2.add_axes([0.15, 0.1, 0.7, 0.3])
In [3]:
ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030')
plot = yt.SlicePlot(ds, 2, 'density')
In [4]:
dens_plot = plot.plots['density']
In [5]:
dens_plot.axes = ax2
dens_plot.figure = fig2
In [6]:
plot.refresh()
Out[6]:

In [7]:
fig2
Out[7]:
In [7]: