Skip to content

Commit

Permalink
DOC: fix a broken docs example
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Jan 2, 2024
1 parent 0d43a2a commit 9df303e
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 9df303e

Please sign in to comment.