Exemple #1
0
def plot_optimal_rpm_region(ax: matplotlib.axes, plot_data: pd.PlotData):

    optimal_rpm, optimal_rpm_range_min, optimal_rpm_range_max = data_processing.get_optimal_rpm(plot_data=plot_data)
    if optimal_rpm is not None:
        ax.axvline(optimal_rpm, color='green', alpha=0.5)
    if optimal_rpm_range_min is not None and optimal_rpm_range_max is not None:
        ax.axvspan(optimal_rpm_range_min, optimal_rpm_range_max, color='green', alpha=0.25)
Exemple #2
0
def plot_vertical_line(
    plot: matplotlib.axes,
    line_name: str,
    line_value: float,
    list_of_colors: List[str],
    num_for_color: int,
):
    """"""

    import numpy

    plot.axvline(
        x=line_value,
        label=f"{line_name} - {numpy.round(line_value, 2)}",
        c=list_of_colors[num_for_color],
        lw=0.6,
        ls="--",
    )