def plot_z_fitpar(fig: plt.figure, fit_par: str, img_id: int, channel: int, led_arrays: Union[Tuple[int, ...], int]) -> None: """plots the height of a LED array against one fit parameter""" # make led_arrays a tuple if type(led_arrays) == int: led_arrays = (led_arrays,) fit_parameters = calc.read_hdf(channel) fit_parameters = calc.include_column_if_nonexistent(fit_parameters, fit_par, channel) fit_parameters = fit_parameters.loc[img_id, :] ax = fig.gca(xlabel=fit_par, ylabel='height/m') for line in led_arrays: plot, = ax.plot(np.array(fit_parameters[fit_parameters['line'] == line][fit_par]), np.array(fit_parameters[fit_parameters['line'] == line]['height'])) plot.set_label(f'LED_Array{line}, C{channel}') ax.legend() plt.title(f'Plot of fit parameter {fit_par} against the height.\n' f'Image: {img_id}')