Action Plot
- class gym_electric_motor.visualization.motor_dashboard_plots.ActionPlot(action=0)[source]
Class to plot the instantaneous actions applied on the environment
- Parameters:
action (int) – Index of the action to be plotted, if there are multiple continuous actions. Select 0, if the environment has a Discrete action space. Default: 0
- property data_idx
Returns the current index to access the time and data arrays.
- initialize(axis)[source]
Initialization of the plot.
It is called by the MotorDashboard. Set labels, legends… when overriding this method.
- Parameters:
axis (matplotlib.pyplot.axis) – Axis to plot in
- on_close()
Gets called at the beginning of a close
- on_reset_begin()
Gets called at the beginning of each reset
- on_reset_end(state, reference)
Gets called at the end of each reset
- on_step_end(k, state, reference, reward, terminated)
Gets called at the end of each step
- render()
Update of the plots axis.
The current x and y-data are written onto the respective lines in this methods. Furthermore the x- and y-axes are scaled dynamically.
- set_width(width)
Sets the width of the plot in data points.
- Parameters:
width (int > 0) – The width of the plot