From 72b76d907655249aec07a787b9f815584f6f499f Mon Sep 17 00:00:00 2001 From: nalquas Date: Mon, 20 May 2024 17:32:39 +0200 Subject: [PATCH] DOC: Make docstring fit into 80 columns and reference matplotlib formats --- rocketpy/mathutils/function.py | 20 ++++- rocketpy/motors/hybrid_motor.py | 10 ++- rocketpy/motors/liquid_motor.py | 5 +- rocketpy/motors/motor.py | 5 +- rocketpy/motors/solid_motor.py | 5 +- rocketpy/motors/tank.py | 5 +- rocketpy/plots/aero_surface_plots.py | 15 +++- rocketpy/plots/compare/compare_flights.py | 5 +- rocketpy/plots/environment_analysis_plots.py | 80 ++++++++++++++++---- rocketpy/plots/environment_plots.py | 20 ++++- rocketpy/plots/flight_plots.py | 55 +++++++++++--- rocketpy/plots/hybrid_motor_plots.py | 30 ++++++-- rocketpy/plots/liquid_motor_plots.py | 5 +- rocketpy/plots/motor_plots.py | 60 ++++++++++++--- rocketpy/plots/plot_helpers.py | 14 +++- rocketpy/plots/rocket_plots.py | 15 +++- rocketpy/plots/solid_motor_plots.py | 10 ++- rocketpy/rocket/aero_surface.py | 10 ++- rocketpy/rocket/rocket.py | 5 +- rocketpy/utilities.py | 10 ++- 20 files changed, 306 insertions(+), 78 deletions(-) diff --git a/rocketpy/mathutils/function.py b/rocketpy/mathutils/function.py index 72d597105..eaae75431 100644 --- a/rocketpy/mathutils/function.py +++ b/rocketpy/mathutils/function.py @@ -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 ------- @@ -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 ------- @@ -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 ------- @@ -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 ------- diff --git a/rocketpy/motors/hybrid_motor.py b/rocketpy/motors/hybrid_motor.py index 63fe80309..3576c7f33 100644 --- a/rocketpy/motors/hybrid_motor.py +++ b/rocketpy/motors/hybrid_motor.py @@ -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 ------- @@ -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 ------- diff --git a/rocketpy/motors/liquid_motor.py b/rocketpy/motors/liquid_motor.py index 686b759ee..9bfdd6ced 100644 --- a/rocketpy/motors/liquid_motor.py +++ b/rocketpy/motors/liquid_motor.py @@ -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 ------- diff --git a/rocketpy/motors/motor.py b/rocketpy/motors/motor.py index ce3fc57d3..13cc536cf 100644 --- a/rocketpy/motors/motor.py +++ b/rocketpy/motors/motor.py @@ -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 ------- diff --git a/rocketpy/motors/solid_motor.py b/rocketpy/motors/solid_motor.py index b6ec7bae2..4d8fdd421 100644 --- a/rocketpy/motors/solid_motor.py +++ b/rocketpy/motors/solid_motor.py @@ -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 ------- diff --git a/rocketpy/motors/tank.py b/rocketpy/motors/tank.py index a297a0fcb..3ccdeb4e2 100644 --- a/rocketpy/motors/tank.py +++ b/rocketpy/motors/tank.py @@ -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 ------- diff --git a/rocketpy/plots/aero_surface_plots.py b/rocketpy/plots/aero_surface_plots.py index d11df9802..a5189c03a 100644 --- a/rocketpy/plots/aero_surface_plots.py +++ b/rocketpy/plots/aero_surface_plots.py @@ -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 ------- @@ -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 ------- @@ -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 ------- diff --git a/rocketpy/plots/compare/compare_flights.py b/rocketpy/plots/compare/compare_flights.py index 95225d648..fada0675e 100644 --- a/rocketpy/plots/compare/compare_flights.py +++ b/rocketpy/plots/compare/compare_flights.py @@ -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 ------- diff --git a/rocketpy/plots/environment_analysis_plots.py b/rocketpy/plots/environment_analysis_plots.py index 248578a2b..da838b63f 100644 --- a/rocketpy/plots/environment_analysis_plots.py +++ b/rocketpy/plots/environment_analysis_plots.py @@ -86,7 +86,10 @@ def wind_gust_distribution(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 ------- @@ -137,7 +140,10 @@ def surface10m_wind_speed_distribution(self, wind_speed_limit=False, filename=No If True, plots the wind speed limit as a vertical line. The default 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 ------- @@ -196,7 +202,10 @@ def average_surface_temperature_evolution(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 ------- @@ -272,7 +281,10 @@ def average_surface10m_wind_speed_evolution( If True, plots the wind speed limit as a horizontal line. The default 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 ------- @@ -366,7 +378,10 @@ def average_surface100m_wind_speed_evolution(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 ------- @@ -448,7 +463,10 @@ def average_wind_speed_profile(self, clear_range_limits=False, filename=None): clear_range_limits : bool, optional If True, clears the range limits. The default 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 ------- @@ -553,7 +571,10 @@ def average_wind_velocity_xy_profile(self, clear_range_limits=False, filename=No clear_range_limits : bool, optional If True, clears the range limits. The default 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 ------- @@ -617,7 +638,10 @@ def average_wind_heading_profile(self, clear_range_limits=False, filename=None): clear_range_limits : bool, optional If True, clears the range limits. The default 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 ------- @@ -674,7 +698,10 @@ def average_pressure_profile(self, clear_range_limits=False, filename=None): clear_range_limits : bool, optional If True, clears the range limits. The default 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 ------- @@ -765,7 +792,10 @@ def average_temperature_profile(self, clear_range_limits=False, filename=None): clear_range_limits : bool, optional If True, clears the range limits. The default 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 ------- @@ -911,7 +941,10 @@ def average_wind_rose_specific_hour(self, hour, fig=None, filename=None): fig: matplotlib.pyplot.figure Figure to plot the windrose 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 ------- @@ -939,7 +972,10 @@ def average_wind_rose_grid(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 ------- @@ -1073,7 +1109,10 @@ def wind_gust_distribution_grid(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 ------- @@ -1252,7 +1291,10 @@ def surface_wind_speed_distribution_grid( wind_speed_limit : bool, optional Whether to plot the wind speed limit as a vertical line 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 ------- @@ -1475,7 +1517,10 @@ def wind_speed_profile_grid(self, clear_range_limits=False, filename=None): clear_range_limits : bool, optional Whether to clear the sky range limits or not, by default 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 ------- @@ -1572,7 +1617,10 @@ def wind_heading_profile_grid(self, clear_range_limits=False, filename=None): Whether to clear the sky range limits or not, by default False. This is useful when the launch site is constrained in terms or altitude. 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 ------- diff --git a/rocketpy/plots/environment_plots.py b/rocketpy/plots/environment_plots.py index bd4158444..2beb53b8a 100644 --- a/rocketpy/plots/environment_plots.py +++ b/rocketpy/plots/environment_plots.py @@ -181,7 +181,10 @@ def gravity_model(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 ------- @@ -212,7 +215,10 @@ def atmospheric_model(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 ------- @@ -250,7 +256,10 @@ def ensemble_member_comparison(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 ------- @@ -357,7 +366,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 ------- diff --git a/rocketpy/plots/flight_plots.py b/rocketpy/plots/flight_plots.py index 1048d6d3d..56f9ff1fa 100644 --- a/rocketpy/plots/flight_plots.py +++ b/rocketpy/plots/flight_plots.py @@ -61,7 +61,10 @@ def trajectory_3d(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 ------- @@ -129,7 +132,10 @@ def linear_kinematics_data(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 ------- @@ -209,7 +215,10 @@ def attitude_data(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 ------- @@ -267,7 +276,10 @@ def flight_path_angle_data(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 ------- @@ -319,7 +331,10 @@ def angular_kinematics_data(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 ------- @@ -393,7 +408,10 @@ def rail_buttons_forces(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 ------- @@ -482,7 +500,10 @@ def aerodynamic_forces(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 ------- @@ -571,7 +592,10 @@ def energy_data(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 ------- @@ -690,7 +714,10 @@ def fluid_mechanics_data(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 ------- @@ -762,7 +789,10 @@ def stability_and_control_data(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 ------- @@ -847,7 +877,10 @@ def pressure_rocket_altitude(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 ------- diff --git a/rocketpy/plots/hybrid_motor_plots.py b/rocketpy/plots/hybrid_motor_plots.py index 9a5ed4384..fa503c3c3 100644 --- a/rocketpy/plots/hybrid_motor_plots.py +++ b/rocketpy/plots/hybrid_motor_plots.py @@ -40,7 +40,10 @@ def grain_inner_radius(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -63,7 +66,10 @@ def grain_height(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -86,7 +92,10 @@ def burn_rate(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -109,7 +118,10 @@ def burn_area(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -132,7 +144,10 @@ def Kn(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -149,7 +164,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 ------- diff --git a/rocketpy/plots/liquid_motor_plots.py b/rocketpy/plots/liquid_motor_plots.py index 23b5159d9..83c4c521c 100644 --- a/rocketpy/plots/liquid_motor_plots.py +++ b/rocketpy/plots/liquid_motor_plots.py @@ -34,7 +34,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 ------- diff --git a/rocketpy/plots/motor_plots.py b/rocketpy/plots/motor_plots.py index 0f4f3e150..b0fe24877 100644 --- a/rocketpy/plots/motor_plots.py +++ b/rocketpy/plots/motor_plots.py @@ -39,7 +39,10 @@ def thrust(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -59,7 +62,10 @@ def total_mass(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -81,7 +87,10 @@ def propellant_mass(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is None, which means that the plot limits will be automatically calculated. 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 ------- @@ -103,7 +112,10 @@ def center_of_mass(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -125,7 +137,10 @@ def mass_flow_rate(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -147,7 +162,10 @@ def exhaust_velocity(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -169,7 +187,10 @@ def I_11(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -189,7 +210,10 @@ def I_22(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -209,7 +233,10 @@ def I_33(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -229,7 +256,10 @@ def I_12(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -249,7 +279,10 @@ def I_13(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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 ------- @@ -269,7 +302,10 @@ def I_23(self, lower_limit=None, upper_limit=None, filename=None): Upper limit of the plot. Default is None, which means that the plot limits will be automatically calculated. 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 ------- diff --git a/rocketpy/plots/plot_helpers.py b/rocketpy/plots/plot_helpers.py index f8d5fe1cb..21694bc63 100644 --- a/rocketpy/plots/plot_helpers.py +++ b/rocketpy/plots/plot_helpers.py @@ -8,12 +8,15 @@ def show_or_save_plot(filename=None): - """Shows or saves the current matplotlib plot. If a filename is given, the plot will be saved, otherwise it will be shown. + """Shows or saves the current matplotlib plot. If a filename is given, the + plot will be saved, otherwise it will be shown. Parameters ---------- filename : str | None, optional - The path the plot should be saved to, by default None. 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. 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). """ if filename == None: plt.show() @@ -35,14 +38,17 @@ def show_or_save_plot(filename=None): def show_or_save_fig(fig: Figure, filename=None): - """Shows or saves the given matplotlib Figure. If a filename is given, the figure will be saved, otherwise it will be shown. + """Shows or saves the given matplotlib Figure. If a filename is given, the + figure will be saved, otherwise it will be shown. Parameters ---------- fig : matplotlib.figure.Figure The figure to be saved or shown. filename : str | None, optional - The path the figure should be saved to, by default None. Supported file endings are: eps, jpg, jpeg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff and webp. + The path the figure should be saved to, by default None. 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). """ if filename == None: fig.show() diff --git a/rocketpy/plots/rocket_plots.py b/rocketpy/plots/rocket_plots.py index 380031f9d..82e907fe9 100644 --- a/rocketpy/plots/rocket_plots.py +++ b/rocketpy/plots/rocket_plots.py @@ -66,7 +66,10 @@ def static_margin(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 ------- @@ -139,7 +142,10 @@ def drag_curves(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 ------- @@ -213,7 +219,10 @@ def draw(self, vis_args=None, filename=None): A full list of color names can be found at: https://matplotlib.org/stable/gallery/color/named_colors 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). """ if vis_args is None: vis_args = { diff --git a/rocketpy/plots/solid_motor_plots.py b/rocketpy/plots/solid_motor_plots.py index 54e0a3a3f..c48369494 100644 --- a/rocketpy/plots/solid_motor_plots.py +++ b/rocketpy/plots/solid_motor_plots.py @@ -117,7 +117,10 @@ def Kn(self, lower_limit=None, upper_limit=None): Upper limit of the plot. Default is none, which means that the plot limits will be automatically calculated. 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). Return ------ None @@ -131,7 +134,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 ------- diff --git a/rocketpy/rocket/aero_surface.py b/rocketpy/rocket/aero_surface.py index 75f59f002..bda923f02 100644 --- a/rocketpy/rocket/aero_surface.py +++ b/rocketpy/rocket/aero_surface.py @@ -501,7 +501,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 ------- @@ -917,7 +920,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 ------- diff --git a/rocketpy/rocket/rocket.py b/rocketpy/rocket/rocket.py index 2b49a6dae..d743b70dc 100644 --- a/rocketpy/rocket/rocket.py +++ b/rocketpy/rocket/rocket.py @@ -1600,7 +1600,10 @@ def draw(self, vis_args=None, filename=None): A full list of color names can be found at: https://matplotlib.org/stable/gallery/color/named_colors 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). """ self.plots.draw(vis_args, filename) return None diff --git a/rocketpy/utilities.py b/rocketpy/utilities.py index 2530af3e8..5e182929a 100644 --- a/rocketpy/utilities.py +++ b/rocketpy/utilities.py @@ -231,7 +231,10 @@ def fin_flutter_analysis( True if you want to see the graphs, False otherwise. If False, the function will return the vectors containing the data for the graphs. 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). Return ------ @@ -319,7 +322,10 @@ def _flutter_plots(flight, flutter_mach, safety_factor, filename=None): Function containing the Safety Factor for the fin flutter. See fin_flutter_analysis for more details. 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 -------