Skip to content

Commit

Permalink
Merge pull request #4776 from neutrinoceros/hotfix_4774
Browse files Browse the repository at this point in the history
DOC: fix a broken docs example
  • Loading branch information
chrishavlin authored Jan 2, 2024
2 parents 0846f22 + 9df303e commit 5396ff0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/source/cookbook/simple_slice_matplotlib_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
# Create a slice object
slc = yt.SlicePlot(ds, "x", ("gas", "density"), width=(800.0, "kpc"))

# Rendering should be performed explicitly *before* any modification is
# performed directly with matplotlib.
slc.render()

# Get a reference to the matplotlib axes object for the plot
ax = slc.plots[("gas", "density")].axes

Expand Down

0 comments on commit 5396ff0

Please sign in to comment.