Skip to content

Commit

Permalink
Fix plotting documentation
Browse files Browse the repository at this point in the history
Issue with matplotlib installation that prevented the plotting page to
be loaded. This was due to a `poetry` installation command.

Also added intersphinx mappings for plotting functionality and made some
text changes to docstrings.
  • Loading branch information
kaitj committed Oct 20, 2023
1 parent 03ad2d8 commit 7307772
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Directories
__pycache__/
_build/

# Testing
.hypothesis
.ruff_cache
.pytest_cache
.pytest_cache
7 changes: 3 additions & 4 deletions afids_utils/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ def plot_ortho(
nii_img: nib.nifti1.Nifti1Image,
opacity: float = 1,
) -> StatMapView:
"""Generate interactive, html ortho view of the slices. Uses ``nilearn``
to generate the figures.
"""Generate interactive, html ortho view of the slices. Uses
``nilearn.plotting`` to generate the figures.
The generated view can either be opened interactively or saved as a figure
per ``nilearn`` functionality:
per ``nilearn.plotting`` functionality:
* Interactive view - ``view.open_in_browser()``
* Save - ``view.save_as_html(file_name.html)``
Expand All @@ -108,7 +108,6 @@ def plot_ortho(
opacity:
Opacity value [0 - transparent, 1 - opaque] of overlaid AFIDs
(default: 0.8)
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion docs/api/transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
```{eval-rst}
.. automodule:: afids_utils.transforms
:members:
```
```
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"matplotlib": ("https://matplotlib.org/stable", None),
"nibabel": ("https://nipy.org/nibabel", None),
"nilearn": ("https://nilearn.github.io/stable/plotting", None),
"numpy": ("https://numpy.org/doc/1.24", None),
"plotly": ("https://plotly.com/python", None),
}


Expand Down

0 comments on commit 7307772

Please sign in to comment.