Skip to content

Commit

Permalink
DOC: Make docstring fit into 80 columns and reference matplotlib formats
Browse files Browse the repository at this point in the history
  • Loading branch information
nalquas committed May 20, 2024
1 parent d06ddbd commit 7354f01
Show file tree
Hide file tree
Showing 20 changed files with 306 additions and 78 deletions.
20 changes: 16 additions & 4 deletions rocketpy/mathutils/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,10 @@ def __call__(self, *args, filename=None):
returned. If the function is N-D, N arguments must be given, each
one being an scalar or list.
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down Expand Up @@ -1223,7 +1226,10 @@ def plot_1d(
which the Function was evaluated in the dataset. Default value is
False.
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down Expand Up @@ -1328,7 +1334,10 @@ def plot_2d(
Colormap of plotted graph, which can be any of the color maps
available in matplotlib. Default value is viridis.
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down Expand Up @@ -1463,7 +1472,10 @@ def compare_plots(
show : bool, optional
If True, shows the plot. Default value is True.
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down
10 changes: 8 additions & 2 deletions rocketpy/motors/hybrid_motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,10 @@ def draw(self, filename=None):
Parameters
----------
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand All @@ -620,7 +623,10 @@ def info(self, filename=None):
Parameters
----------
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down
5 changes: 4 additions & 1 deletion rocketpy/motors/liquid_motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,10 @@ def draw(self, filename=None):
Parameters
----------
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down
5 changes: 4 additions & 1 deletion rocketpy/motors/motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,10 @@ def info(self, filename=None):
Parameters
----------
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down
5 changes: 4 additions & 1 deletion rocketpy/motors/solid_motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,10 @@ def draw(self, filename=None):
Parameters
----------
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down
5 changes: 4 additions & 1 deletion rocketpy/motors/tank.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,10 @@ def draw(self, filename=None):
Parameters
----------
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down
15 changes: 12 additions & 3 deletions rocketpy/plots/aero_surface_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ def draw(self, filename=None):
Parameters
----------
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down Expand Up @@ -247,7 +250,10 @@ def draw(self, filename=None):
Parameters
----------
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down Expand Up @@ -377,7 +383,10 @@ def draw(self, filename=None):
Parameters
----------
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down
5 changes: 4 additions & 1 deletion rocketpy/plots/compare/compare_flights.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,10 @@ def __plot_xz(
figsize : tuple, optional
Tuple with the size of the figure. The default is (7, 7).
filename : str | None, optional
The path the plot should be saved to. By default None, in which case the plot will be shown instead of saved. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp.
The path the plot should be saved to. By default None, in which case
the plot will be shown instead of saved. Supported file endings are:
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
and webp (these are the formats supported by matplotlib).
Returns
-------
Expand Down
Loading

0 comments on commit 7354f01

Please sign in to comment.