|
1 | 1 | """Plot radial profiles.""" |
| 2 | + |
| 3 | +from __future__ import annotations |
| 4 | +import typing |
| 5 | + |
2 | 6 | import matplotlib.pyplot as plt |
3 | 7 |
|
4 | 8 | from . import conf, _helpers |
5 | 9 | from .stagyydata import StagyyData |
6 | 10 |
|
| 11 | +if typing.TYPE_CHECKING: |
| 12 | + from ._step import Step, _Rprofs |
| 13 | + |
7 | 14 |
|
8 | | -def plot_rprofs(rprofs, names): |
| 15 | +def plot_rprofs(rprofs: _Rprofs, names: str): |
9 | 16 | """Plot requested radial profiles. |
10 | 17 |
|
11 | 18 | Args: |
12 | | - rprofs (:class:`~stagpy._step._Rprofs`): a radial profile viewer |
13 | | - such as :attr:`Step.rprofs` and :attr:`_StepsView.rprofs_averaged`. |
14 | | - names (str): profile names separated by ``-`` (figures), ``.`` |
15 | | - (subplots) and ``,`` (same subplot). |
| 19 | + rprofs: a radial profile collection, such as :attr:`Step.rprofs` or |
| 20 | + :attr:`_StepsView.rprofs_averaged`. |
| 21 | + names: profile names separated by ``-`` (figures), ``.`` (subplots) and |
| 22 | + ``,`` (same subplot). |
16 | 23 | """ |
17 | 24 | try: |
18 | 25 | stepstr = rprofs.steps.stepstr |
@@ -59,7 +66,7 @@ def plot_rprofs(rprofs, names): |
59 | 66 | _helpers.saveplot(fig, fname + stepstr) |
60 | 67 |
|
61 | 68 |
|
62 | | -def plot_grid(step): |
| 69 | +def plot_grid(step: Step): |
63 | 70 | """Plot cell position and thickness. |
64 | 71 |
|
65 | 72 | The figure is call grid_N.pdf where N is replace by the step index. |
|
0 commit comments