Rocket Plots Class#
- class rocketpy.plots.rocket_plots._RocketPlots[source]#
Class that holds plot methods for Rocket class.
- Variables:
_RocketPlots.rocket (
Rocket
) – Rocket object that will be used for the plots.
- __init__(rocket)[source]#
Initializes _RocketPlots class.
- Parameters:
rocket (
Rocket
) – Instance of the Rocket class- Return type:
None
- stability_margin()[source]#
Plots static margin of the rocket as a function of time.
- Return type:
None
- power_off_drag()[source]#
Plots power off drag of the rocket as a function of time.
- Return type:
None
- drag_curves()[source]#
Plots power off and on drag curves of the rocket as a function of time.
- Return type:
None
- thrust_to_weight()[source]#
Plots the motor thrust force divided by rocket weight as a function of time.
- draw(vis_args=None, plane='xz')[source]#
Draws the rocket in a matplotlib figure.
- Parameters:
vis_args (
dict
, optional) –Determines the visual aspects when drawing the rocket. If
None
, default values are used. Default values are:{ "background": "#EEEEEE", "tail": "black", "nose": "black", "body": "black", "fins": "black", "motor": "black", "buttons": "black", "line_width": 2.0, }
A full list of color names can be found at: https://matplotlib.org/stable/gallery/color/named_colors
plane (
str
, optional) – Plane in which the rocket will be drawn. Default is ‘xz’. Other options is ‘yz’. Used only for sensors representation.
- _draw_aerodynamic_surfaces(ax, vis_args, plane)[source]#
Draws the aerodynamic surfaces and saves the position of the points of interest for the tubes.
- _draw_nose_cone(ax, surface, position, drawn_surfaces, vis_args)[source]#
Draws the nosecone and saves the position of the points of interest for the tubes.
- _draw_tail(ax, surface, position, drawn_surfaces, vis_args)[source]#
Draws the tail and saves the position of the points of interest for the tubes.
- _draw_fins(ax, surface, position, drawn_surfaces, vis_args)[source]#
Draws the fins and saves the position of the points of interest for the tubes.
- _draw_generic_surface(ax, surface, position, drawn_surfaces, vis_args, plane)[source]#
Draws the generic surface and saves the position of the points of interest for the tubes.
- _draw_tubes(ax, drawn_surfaces, vis_args)[source]#
Draws the tubes between the aerodynamic surfaces.
- _draw_nozzle_tube(last_radius, last_x, nozzle_position, ax, vis_args)[source]#
Draws the tube from the last surface to the nozzle position.
- _draw_center_of_mass_and_pressure(ax)[source]#
Draws the center of mass and center of pressure of the rocket.