Skip to content

Commit 7354f01

Browse files
committed
DOC: Make docstring fit into 80 columns and reference matplotlib formats
1 parent d06ddbd commit 7354f01

20 files changed

+306
-78
lines changed

rocketpy/mathutils/function.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,10 @@ def __call__(self, *args, filename=None):
10911091
returned. If the function is N-D, N arguments must be given, each
10921092
one being an scalar or list.
10931093
filename : str | None, optional
1094-
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.
1094+
The path the plot should be saved to. By default None, in which case
1095+
the plot will be shown instead of saved. Supported file endings are:
1096+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
1097+
and webp (these are the formats supported by matplotlib).
10951098
10961099
Returns
10971100
-------
@@ -1223,7 +1226,10 @@ def plot_1d(
12231226
which the Function was evaluated in the dataset. Default value is
12241227
False.
12251228
filename : str | None, optional
1226-
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.
1229+
The path the plot should be saved to. By default None, in which case
1230+
the plot will be shown instead of saved. Supported file endings are:
1231+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
1232+
and webp (these are the formats supported by matplotlib).
12271233
12281234
Returns
12291235
-------
@@ -1328,7 +1334,10 @@ def plot_2d(
13281334
Colormap of plotted graph, which can be any of the color maps
13291335
available in matplotlib. Default value is viridis.
13301336
filename : str | None, optional
1331-
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.
1337+
The path the plot should be saved to. By default None, in which case
1338+
the plot will be shown instead of saved. Supported file endings are:
1339+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
1340+
and webp (these are the formats supported by matplotlib).
13321341
13331342
Returns
13341343
-------
@@ -1463,7 +1472,10 @@ def compare_plots(
14631472
show : bool, optional
14641473
If True, shows the plot. Default value is True.
14651474
filename : str | None, optional
1466-
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.
1475+
The path the plot should be saved to. By default None, in which case
1476+
the plot will be shown instead of saved. Supported file endings are:
1477+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
1478+
and webp (these are the formats supported by matplotlib).
14671479
14681480
Returns
14691481
-------

rocketpy/motors/hybrid_motor.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,10 @@ def draw(self, filename=None):
606606
Parameters
607607
----------
608608
filename : str | None, optional
609-
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.
609+
The path the plot should be saved to. By default None, in which case
610+
the plot will be shown instead of saved. Supported file endings are:
611+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
612+
and webp (these are the formats supported by matplotlib).
610613
611614
Returns
612615
-------
@@ -620,7 +623,10 @@ def info(self, filename=None):
620623
Parameters
621624
----------
622625
filename : str | None, optional
623-
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.
626+
The path the plot should be saved to. By default None, in which case
627+
the plot will be shown instead of saved. Supported file endings are:
628+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
629+
and webp (these are the formats supported by matplotlib).
624630
625631
Returns
626632
-------

rocketpy/motors/liquid_motor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,10 @@ def draw(self, filename=None):
472472
Parameters
473473
----------
474474
filename : str | None, optional
475-
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.
475+
The path the plot should be saved to. By default None, in which case
476+
the plot will be shown instead of saved. Supported file endings are:
477+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
478+
and webp (these are the formats supported by matplotlib).
476479
477480
Returns
478481
-------

rocketpy/motors/motor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,10 @@ def info(self, filename=None):
10421042
Parameters
10431043
----------
10441044
filename : str | None, optional
1045-
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.
1045+
The path the plot should be saved to. By default None, in which case
1046+
the plot will be shown instead of saved. Supported file endings are:
1047+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
1048+
and webp (these are the formats supported by matplotlib).
10461049
10471050
Returns
10481051
-------

rocketpy/motors/solid_motor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,10 @@ def draw(self, filename=None):
705705
Parameters
706706
----------
707707
filename : str | None, optional
708-
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.
708+
The path the plot should be saved to. By default None, in which case
709+
the plot will be shown instead of saved. Supported file endings are:
710+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
711+
and webp (these are the formats supported by matplotlib).
709712
710713
Returns
711714
-------

rocketpy/motors/tank.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,10 @@ def draw(self, filename=None):
491491
Parameters
492492
----------
493493
filename : str | None, optional
494-
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.
494+
The path the plot should be saved to. By default None, in which case
495+
the plot will be shown instead of saved. Supported file endings are:
496+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
497+
and webp (these are the formats supported by matplotlib).
495498
496499
Returns
497500
-------

rocketpy/plots/aero_surface_plots.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ def draw(self, filename=None):
7979
Parameters
8080
----------
8181
filename : str | None, optional
82-
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.
82+
The path the plot should be saved to. By default None, in which case
83+
the plot will be shown instead of saved. Supported file endings are:
84+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
85+
and webp (these are the formats supported by matplotlib).
8386
8487
Returns
8588
-------
@@ -247,7 +250,10 @@ def draw(self, filename=None):
247250
Parameters
248251
----------
249252
filename : str | None, optional
250-
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.
253+
The path the plot should be saved to. By default None, in which case
254+
the plot will be shown instead of saved. Supported file endings are:
255+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
256+
and webp (these are the formats supported by matplotlib).
251257
252258
Returns
253259
-------
@@ -377,7 +383,10 @@ def draw(self, filename=None):
377383
Parameters
378384
----------
379385
filename : str | None, optional
380-
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.
386+
The path the plot should be saved to. By default None, in which case
387+
the plot will be shown instead of saved. Supported file endings are:
388+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
389+
and webp (these are the formats supported by matplotlib).
381390
382391
Returns
383392
-------

rocketpy/plots/compare/compare_flights.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1472,7 +1472,10 @@ def __plot_xz(
14721472
figsize : tuple, optional
14731473
Tuple with the size of the figure. The default is (7, 7).
14741474
filename : str | None, optional
1475-
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.
1475+
The path the plot should be saved to. By default None, in which case
1476+
the plot will be shown instead of saved. Supported file endings are:
1477+
eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff
1478+
and webp (these are the formats supported by matplotlib).
14761479
14771480
Returns
14781481
-------

0 commit comments

Comments
 (0)