Skip to content

Commit

Permalink
Adjust figures in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dmentipl committed Oct 12, 2021
1 parent 670d088 commit 68d7c0e
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions docs/source/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,12 @@ You can plot columns with the pandas plotting interface.

The previous code produces the following figure.

![The accretion disc center of mass as a function of time.](_static/ev.png)
```{figure} _static/ev.png
---
width: 100%
---
The accretion disc center of mass as a function of time.
```

## Visualization of SPH data

Expand All @@ -310,7 +315,12 @@ column density, i.e. a projection plot.
>>> snap.image(quantity='density')
```

![The total column density.](_static/density.png)
```{figure} _static/density.png
---
width: 100%
---
The total column density.
```

This produces an image via Matplotlib. The function returns a Matplotlib
{class}`AxesSubplot` object.
Expand All @@ -330,7 +340,12 @@ minimum and maxiumum. In addition, we set the extent, i.e. the x- and y-limits.
... )
```

![The column density zoomed around the planet.](_static/density_zoom.png)
```{figure} _static/density_zoom.png
---
width: 100%
---
The column density zoomed around the planet.
```

More fine-grained control can be achieved by using the full details of
{meth}`~Snap.image`. See the API for more details.
Expand Down Expand Up @@ -378,7 +393,12 @@ Let's plot the gas and dust side-by-side.
... subsnap.image(quantity='density', extent=extent, cmap='gist_heat', ax=ax)
```

![The column density of the gas and dust.](_static/dust-gas.png)
```{figure} _static/dust-gas.png
---
width: 100%
---
The column density of the gas and dust.
```

### Derived arrays

Expand Down Expand Up @@ -653,6 +673,10 @@ We can also plot the profiles.
>>> prof.plot('radius', 'scale_height', ax=axs[1])
```

![](_static/profile.png)
```{figure} _static/profile.png
---
width: 100%
---
```

[^f1]: See [https://pandas.pydata.org/](https://pandas.pydata.org/) for more on pandas.

0 comments on commit 68d7c0e

Please sign in to comment.