POSEIDON.visuals ================ .. py:module:: POSEIDON.visuals .. autoapi-nested-parse:: Plotting routines to visualise POSEIDON output. Attributes ---------- .. autoapisummary:: POSEIDON.visuals.linestyles POSEIDON.visuals.dark_theme POSEIDON.visuals.light_theme Functions --------- .. autoapisummary:: POSEIDON.visuals.scale_lightness POSEIDON.visuals.plot_transit POSEIDON.visuals.plot_geometry POSEIDON.visuals.plot_geometry_spectrum_mixed POSEIDON.visuals.plot_PT POSEIDON.visuals.plot_chem POSEIDON.visuals.set_spectrum_wl_ticks POSEIDON.visuals.plot_spectra POSEIDON.visuals.plot_data POSEIDON.visuals.plot_spectra_retrieved POSEIDON.visuals.plot_PT_retrieved POSEIDON.visuals.plot_chem_retrieved POSEIDON.visuals.plot_stellar_flux POSEIDON.visuals.plot_histogram POSEIDON.visuals.plot_parameter_panel POSEIDON.visuals.plot_retrieved_parameters POSEIDON.visuals.elemental_ratio_samples POSEIDON.visuals.plot_histograms POSEIDON.visuals.vary_one_parameter_PT Module Contents --------------- .. py:data:: linestyles .. py:data:: dark_theme .. py:data:: light_theme .. py:function:: scale_lightness(colour_name, scale) Scale the lightness of a colour by the given factor. :param colour_name: The name of the colour to be scaled, in matplotlib colour format. :type colour_name: str :param scale: The factor by which to scale the lightness of the colour (< 1 makes the colour darker). :type scale: float :returns: A tuple containing the RGB values of the scaled colour. :rtype: tuple .. py:function:: plot_transit(ax, R_p, R_s, b_p, r, T, phi, phi_edge, theta, theta_edge, perspective, y_p=0.0, plot_labels=True, show_star=False, annotate_Rp=False, dark_mode=False) Subfunction used by the 'plot_geometry' function below. This function plots a 2D slice through an exoplanet and its atmosphere (to scale) from various observer perspectives. :param ax: A matplotlib axis instance. :type ax: matplotlib axis object :param R_p: White light planetary radius. :type R_p: float :param r: Radial distance profile (m). :type r: 3D np.array of float :param T: Temperature profile (K). :type T: 3D np.array of float :param phi: Mid-sector angles (radians). :type phi: np.array of float :param phi_edge: Boundary angles for each sector (radians). :type phi_edge: np.array of float :param dphi: Angular width of each sector (radians). :type dphi: np.array of float :param theta: Mid-zone angles (radians). :type theta: np.array of float :param theta_edge: Boundary angles for each zone (radians). :type theta_edge: np.array of float :param dtheta: Angular width of each zone (radians). :type dtheta: np.array of float :param perspective: Observer viewing perspective for 2D slice. (Options: terminator / day-night). :type perspective: str :param y_p: Projected coordinate of planet centre from observer perspective :type y_p: float :param plot_labels: If False, removes text labels from the plot. :type plot_labels: bool :param show_star: If True, plots the star in the background from observer perspective :type show_star: bool :param annotate_Rp: If True, adds an arrow to the terminator perspective plot showing the radius of the planet (works best when show_star = True). :type annotate_Rp: bool :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool :returns: Patch collection containing atmosphere slices and temperature colour bar. The figure itself is written to the provided axis. :rtype: p (matplotlib PatchCollection) .. py:function:: plot_geometry(planet, star, model, atmosphere, plot_labels=True, dark_mode=False) Plots two 2D slice plots through the planetary atmosphere (to scale), coloured according to the temperature field. The left panel corresponds to a slice through the terminator plane, while the right panel is a slice through the north pole - observer plane. :param planet: POSEIDON planet properties dictionary. :type planet: dict :param star: POSEIDON stellar properties dictionary (currently unused). :type star: dict :param model: POSEIDON model properties dictionary. :type model: dict :param atmosphere: POSEIDON atmospheric properties dictionary. :type atmosphere: dict :param plot_labels: If False, removes text labels from the plot. :type plot_labels: bool :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool, optional :returns: The geometric slice plot. :rtype: fig (matplotlib figure object) .. py:function:: plot_geometry_spectrum_mixed(planet, star, model, atmosphere, spectra, y_p=0.0, plot_labels=False, show_star=True, annotate_Rp=True, data_properties=None, show_data=False, plot_full_res=True, bin_spectra=True, R_to_bin=100, wl_min=None, wl_max=None, y_min=None, y_max=None, y_unit='transit_depth', plt_label=None, colour_list=[], spectra_labels=[], data_colour_list=[], data_labels=[], data_marker_list=[], data_marker_size_list=[], wl_axis='log', figure_shape='default', legend_location='upper right', legend_box=True, dark_mode=False) Plots two 2D slice plots through the planetary atmosphere (to scale). :param planet: POSEIDON planet properties dictionary. :type planet: dict :param star: POSEIDON stellar properties dictionary (currently unused). :type star: dict :param model: POSEIDON model properties dictionary. :type model: dict :param atmosphere: POSEIDON atmospheric properties dictionary. :type atmosphere: dict :param spectra: List of spectra to plot. :type spectra: list :param y_p: Projected coordinate of planet centre from observer perspective. :type y_p: float :param plot_labels: If False, removes text labels from the plot. :type plot_labels: bool :param show_star: If True, plots the star in the background from observer perspective. :type show_star: bool :param annotate_Rp: If True, adds an arrow to the terminator perspective plot showing the radius of the planet (works best when show_star = True). :type annotate_Rp: bool :param data_properties: Dictionary containing data properties. :type data_properties: dict, optional :param show_data: If True, shows data on the right-hand side plot. :type show_data: bool :param plot_full_res: If True, shows full resolution spectra. :type plot_full_res: bool :param bin_spectra: If True, bins spectra. :type bin_spectra: bool :param R_to_bin: Binning spectral resolution. :type R_to_bin: int :param wl_min: Minimum wavelength for plotting. :type wl_min: float :param wl_max: Maximum wavelength for plotting. :type wl_max: float :param y_min: Minimum y-axis value for plotting. :type y_min: float :param y_max: Maximum y-axis value for plotting. :type y_max: float :param y_unit: Unit for y-axis. Default is 'transit_depth'. :type y_unit: str :param plt_label: Label for the plot. :type plt_label: str :param colour_list: List of colours for plotting spectra. :type colour_list: list :param spectra_labels: List of labels for spectra. :type spectra_labels: list :param data_colour_list: List of colours for data points. :type data_colour_list: list :param data_labels: List of labels for data points. :type data_labels: list :param data_marker_list: List of markers for data points. :type data_marker_list: list :param data_marker_size_list: List of marker sizes for data points. :type data_marker_size_list: list :param wl_axis: Axis for wavelength. :type wl_axis: str :param figure_shape: Shape of the figure. :type figure_shape: str :param legend_location: Location of the legend. :type legend_location: str :param legend_box: If True, shows legend box. :type legend_box: bool :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool, optional :returns: The geometric slice plot. :rtype: fig (matplotlib figure object) .. py:function:: plot_PT(planet, model, atmosphere, show_profiles=[], PT_label=None, log_P_min=None, log_P_max=None, T_min=None, T_max=None, colour='darkblue', legend_location='lower left', ax=None, dark_mode=False) Plot the pressure-temperature (P-T) profiles defining the atmosphere. :param planet: POSEIDON planet properties dictionary. :type planet: dict :param model: POSEIDON model properties dictionary. :type model: dict :param atmosphere: Dictionary containing atmospheric properties. :type atmosphere: dict :param show_profiles: List of profiles to plot. Default is an empty list. For a 1D model, a single P-T profile is plotted. For 2D or 3D models, the user can specify the regions for which the P-T profiles should be plotted. This is handled through 'show_profiles'. Valid choices for 2D and 3D models: 2D Day-Night: ['day', 'night', 'terminator'] 2D Evening-Morning: ['morning', 'evening', 'average'] 3D: ['evening-day', 'evening-night', 'evening-terminator', 'morning-day', 'morning-night', 'morning-terminator', 'terminator-average'] Any subset of the above can be passed via 'show_profiles'. PT_label (str, optional): Label for the P-T profile. log_P_min (float, optional): Minimum value for the log10 pressure. log_P_max (float, optional): Maximum value for the log10 pressure. T_min (float, optional): Minimum temperature to plot. T_max (float, optional): Maximum temperature to plot. colour (str, optional): Colour of the plotted P-T profile. legend_location (str, optional): Location of the legend. Default is 'lower left'. :type show_profiles: list, optional :param ax: Matplotlib axis provided externally. :type ax: matplotlib axis object, optional :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool, optional :rtype: fig (matplotlib figure object) The P-T profile plot. .. py:function:: plot_chem(planet, model, atmosphere, plot_species=[], colour_list=[], show_profiles=[], log_X_min=None, log_X_max=None, log_P_min=None, log_P_max=None, legend_title=None, legend_location='upper right', dark_mode=False) Plot the mixing ratio profiles defining the atmosphere. The user specifies which chemical species to plot via the list 'plot_species'. The colours used for each species can be specified by the user via 'colour_list', or else default colours will be used. This function supports plotting up to 8 chemical species. :param planet: Dictionary containing planet properties. :type planet: dict :param model: Dictionary containing model properties. :type model: dict :param atmosphere: Dictionary containing atmospheric properties. :type atmosphere: dict :param plot_species: List of chemical species to plot. If not specified, default to all chemical species in the model (including bulk species). :type plot_species: list, optional :param colour_list: List of colours to use for each species in plot_species. Default is a predefined list, if the user doesn't provide one. :type colour_list: list, optional :param show_profiles: List of chemical profiles to plot. Default is an empty list. For a 1D model, a single P-T profile is plotted. For 2D or 3D models, the user can specify the regions for which the P-T profiles should be plotted. This is handled through 'show_profiles'. Valid choices for 2D and 3D models: 2D Day-Night: ['day', 'night', 'terminator'] 2D Evening-Morning: ['morning', 'evening', 'average'] 3D: ['evening-day', 'evening-night', 'evening-terminator', 'morning-day', 'morning-night', 'morning-terminator', 'terminator-average'] Any subset of the above can be passed via 'show_profiles'. :type show_profiles: list, optional :param log_X_min: Minimum log10 mixing ratio to plot. If not specified, the range is calculated automatically. :type log_X_min: float, optional :param log_X_max: Minimum log10 mixing ratio to plot. If not specified, the range is calculated automatically. :type log_X_max: float, optional :param log_P_min: Minimum log10 pressure to plot. If not specified, the range is calculated automatically. :type log_P_min: float, optional :param log_P_max: Minimum log10 pressure to plot. If not specified, the range is calculated automatically. :type log_P_max: float, optional :param legend_title: Title for the legend. Defaults to the model name if not provided. :type legend_title: str, optional :param legend_location: Location of the legend. Default is 'upper right'. :type legend_location: str, optional :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool, optional :param Returns: fig (matplotlib figure object): Chemical mixing ratio plot. .. py:function:: set_spectrum_wl_ticks(wl_min, wl_max, wl_axis='log') Calculates default x axis tick spacing for spectra plots in POSEIDON. :param wl_min: The minimum wavelength to plot. :type wl_min: float :param wl_max: The maximum wavelength to plot. :type wl_max: float :param wl_axis: The type of x-axis to use ('log' or 'linear'). :type wl_axis: str, optional :returns: The x axis tick values for the given wavelength range. :rtype: np.array .. py:function:: plot_spectra(spectra, planet, data_properties=None, show_data=False, plot_full_res=True, bin_spectra=True, R_to_bin=100, plt_label=None, show_planet_name=True, wl_min=None, wl_max=None, y_min=None, y_max=None, y_unit='transit_depth', colour_list=[], spectra_labels=[], data_colour_list=[], data_labels=[], data_marker_list=[], data_marker_size_list=[], data_alpha_list=[], data_eline_alpha_list=[], data_edge_width_list=[], data_eline_colour_list=[], data_eline_width_list=[], line_width_list=[], line_style_list=[], line_alpha_list=[], text_annotations=[], annotation_pos=[], err_colour=None, wl_axis='log', figure_shape='default', show_legend=True, legend_location='upper right', legend_box=True, legend_line_size=[], legend_n_columns=0, ax=None, save_fig=True, model=None, show_data_bin_width=True, show_data_cap=True, add_retrieved_offsets=False, verbose_offsets=True, add_retrieved_error_inflation=False, xlabels=True, x_wavelength_label=True, x_tick_label=True, ylabels=True, x_tick_fontsize=12, x_label_fontsize=16, y_tick_fontsize=12, y_label_fontsize=16, x_tick_list=[], legend_fontsize=10, plt_label_fontsize=14, planet_name_fontsize=16, plot_style='standard', fill_between=[], fill_between_alpha=0.5, fill_to_spectrum=[], fill_to_spectrum_list=[], dark_mode=False) Plot a collection of individual model spectra. This function can plot transmission or emission spectra, according to the user's choice of 'y_unit'. :param spectra: A list of model spectra to be plotted, each with the format (wl, spectrum). :type spectra: list of tuples :param planet: POSEIDON planet properties dictionary. :type planet: dict :param data_properties: POSEIDON observational data properties dictionary. :type data_properties: dict, optional :param show_data: Flag indicating whether to plot the observational data. :type show_data: bool, optional :param plot_full_res: Flag indicating whether to plot full resolution model spectra. :type plot_full_res: bool, optional :param bin_spectra: Flag indicating whether to bin model spectra to the resolution specified by 'R_to_bin'. :type bin_spectra: bool, optional :param R_to_bin: Spectral resolution (R = wl/dwl) to bin the model spectra to. :type R_to_bin: int, optional :param plt_label: The label for the plot. :type plt_label: str, optional :param show_planet_name: Flag indicating whether to include the planet name in the top left. :type show_planet_name: bool, optional :param wl_min: The minimum wavelength to plot. :type wl_min: float, optional :param wl_max: The maximum wavelength to plot. :type wl_max: float, optional :param y_min: The minimum value for the y-axis. :type y_min: float, optional :param y_max: The maximum value for the y-axis. :type y_max: float, optional :param y_unit: The unit of the y-axis (Options: 'transit_depth', 'eclipse_depth', '(Rp/Rs)^2', '(Rp/R*)^2', 'Fp/Fs', 'Fp/F*', 'Fp', 'Fs', 'F*'). :type y_unit: str, optional :param colour_list: A list of colours for the model spectra. :type colour_list: list, optional :param spectra_labels: A list of labels for the model spectra. :type spectra_labels: list, optional :param data_colour_list: A list of colours for the observational data points. :type data_colour_list: list, optional :param data_labels: A list of labels for the observational data. :type data_labels: list, optional :param data_marker_list: A list of marker styles for the observational data. :type data_marker_list: list, optional :param data_marker_size_list: A list of marker sizes for the observational data. :type data_marker_size_list: list, optional :param data_alpha_list: Alpha values for the central circle colours on each data point (defaults to 1.0 if not specified). :type data_alpha_list: list of float, optional :param data_eline_alpha_list: Alpha values for the error bar colours on each data point (defaults to 0.8 if not specified). :type data_eline_alpha_list: list of float, optional :param data_edge_width_list: Border line width for the central circle on each data point (defaults to 0.8 if not specified). :type data_edge_width_list: list of float, optional :param data_eline_colour_list: Colours for data error bars (defaults to 'black' if not specified). :type data_eline_colour_list: list of str, optional :param data_eline_width_list: Line widths for error bars (defaults to 1.0 if not specified). :type data_eline_width_list: list of float, optional :param line_width_list: Line widths for binned spectra (defaults to 2.0 if not specified). :type line_width_list: list of float, optional :param line_style_list: Line styles for binned spectra (defaults to '-' if not specified). :type line_style_list: list of str, optional :param line_alpha_list: Alpha values for binned spectra (defaults to 0.8 if not specified). :type line_alpha_list: list of float, optional :param text_annotations: A list of text annotations for Figure decoration (e.g. molecule names) :type text_annotations: list of str, optional :param annotation_pos: (x, y) locations of the text annotations in the previous argument. :type annotation_pos: list of tuples of str, optional :param err_colour: Colour of the data error bars if they are all the same (you can use data_eline_colour_list to have different colours). :type err_colour: str, optional :param wl_axis: The type of x-axis to use ('log' or 'linear'). :type wl_axis: str, optional :param figure_shape: The shape of the figure ('default' or 'wide' - the latter is 16:9). :type figure_shape: str, optional :param show_legend: If False, will not plot legend. :type show_legend: bool, optional :param legend_location: The location of the legend ('upper left', 'upper right', 'lower left', 'lower right','outside right'). :type legend_location: str, optional :param legend_box: Flag indicating whether to plot a box surrounding the figure legend. :type legend_box: bool, optional :param legend_line_size: Size of lines in the legend. Put 1 for data points :type legend_line_size: list of float, optional :param legend_n_columns: Manually set the number of columns for the legend. :type legend_n_columns: integer :param ax: Matplotlib axis provided externally. :type ax: matplotlib axis object, optional :param save_fig: If True, saves a PDF in the POSEIDON output folder. :type save_fig: bool, optional :param model: POSEIDON model dictionary. Required to be defined for offsets to be added. :type model: dict, optional :param show_data_bin_width: Flag indicating whether to plot x bin widths for data points. :type show_data_bin_width: bool, optional :param show_data_cap: Flag indicating whether to plot the error bar caps on the data points. :type show_data_cap: bool, optional :param add_retrieved_offsets: Plots data with retrieved offset values. :type add_retrieved_offsets: bool, optional :param add_retrieved_error_inflation: Plots data error bars including retrieved error inflation value. :type add_retrieved_error_inflation: bool, optional :param verbose offsets: Will print out offsets applied to which datasets. :type verbose offsets: bool, optional :param x_labels: If False, will remove x_ticks labels and Wavelength (um). :type x_labels: bool :param x_wavelength_label: If False, will just remove 'Wavelength (um) :type x_wavelength_label: bool :param x_tick_label: If False, will just remove the x tick labels :type x_tick_label: bool :param y_labels: If False, will remove y_ticks labels and y_label. :type y_labels: bool :param x_tick_fontsize: Font size for x-axis tick labels. :type x_tick_fontsize: int, optional :param x_label_fontsize: Font size for x-axis label. :type x_label_fontsize: int, optional :param y_tick_fontsize: Font size for y-axis tick labels. :type y_tick_fontsize: int, optional :param y_label_fontsize: Font size for y-axis label. :type y_label_fontsize: int, optional :param x_tick_list: Sets the xticks :type x_tick_list: list of floats, optional :param legend_fontsize: Font size for the legend. :type legend_fontsize: int, optional :param plt_label_fontsize: Font size for the plot label. :type plt_label_fontsize: int, optional :param planet_name_fontsize: Font size for the planet name. :type planet_name_fontsize: int, optional :param plot_style: (Experimental!) plot style ('standard' or 'fancy'). :type plot_style: str, optional :param fill_between: If True, spectrum will have a fill color from its line to 0 or fill_to_spectrum. :type fill_between: list of bools, optional :param fill_between_alpha: Alpha of the fill region. :type fill_between_alpha: int, optional :param fill_to_spectrum: If non-empty, will fill spectra to this spectrum (instead of 0). :type fill_to_spectrum: list of ints, optional :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool, optional :returns: The spectra plot. :rtype: fig (matplotlib figure object) .. py:function:: plot_data(data, planet_name, wl_min=None, wl_max=None, y_min=None, y_max=None, y_unit='transit_depth', plt_label=None, data_colour_list=[], data_labels=[], data_marker_list=[], data_marker_size_list=[], err_colour='black', wl_axis='log', figure_shape='default', legend_location='upper right', legend_box=True, show_data_bin_width=True, show_data_cap=True, data_alpha=0.8, data_edge_width=0.8, ax=None, save_fig=True, x_tick_fontsize=12, x_label_fontsize=16, y_tick_fontsize=12, y_label_fontsize=16, legend_fontsize=10, plt_label_fontsize=14, planet_name_fontsize=16, dark_mode=False) Plot a collection of datasets. This function can plot transmission or emission datasets, according to the user's choice of 'y_unit'. :param data: POSEIDON observational data properties dictionary. :type data: dict :param planet_name: Name of the planet. :type planet_name: str :param wl_min: The minimum wavelength to plot. :type wl_min: float, optional :param wl_max: The maximum wavelength to plot. :type wl_max: float, optional :param y_min: The minimum value for the y-axis. :type y_min: float, optional :param y_max: The maximum value for the y-axis. :type y_max: float, optional :param y_unit: The unit of the y-axis (Options: 'transit_depth', 'eclipse_depth', '(Rp/Rs)^2', '(Rp/R*)^2', 'Fp/Fs', 'Fp/F*', 'Fp'). :type y_unit: str, optional :param plt_label: The label for the plot. :type plt_label: str, optional :param data_colour_list: A list of colours for the observational data points. :type data_colour_list: list, optional :param data_labels: A list of labels for the observational data. :type data_labels: list, optional :param data_marker_list: A list of marker styles for the observational data. :type data_marker_list: list, optional :param data_marker_size_list: A list of marker sizes for the observational data. :type data_marker_size_list: list, optional :param err_colour: Colour of the data error bars (white works best for a dark background) :type err_colour: string, optional :param wl_axis: The type of x-axis to use ('log' or 'linear'). :type wl_axis: str, optional :param figure_shape: The shape of the figure ('default' or 'wide' - the latter is 16:9). :type figure_shape: str, optional :param legend_location: The location of the legend ('upper left', 'upper right', 'lower left', 'lower right', 'outside right'). :type legend_location: str, optional :param legend_box: Flag indicating whether to plot a box surrounding the figure legend. :type legend_box: bool, optional :param show_data_bin_width: Flag indicating whether to plot x bin widths for data points. :type show_data_bin_width: bool, optional :param show_data_cap: Flag indicating whether to show the caps on the data error bars. :type show_data_cap: bool, optional :param data_alpha: Alpha for the central circle colours on each data point. :type data_alpha: float, optional :param data_edge_width: Border line width for the central circle on each data point. :type data_edge_width: float, optional :param ax: Matplotlib axis provided externally. :type ax: matplotlib axis object, optional :param save_fig: If True, saves a PDF in the POSEIDON output folder. :type save_fig: bool, optional :param x_tick_fontsize: Font size for x-axis tick labels. :type x_tick_fontsize: int, optional :param x_label_fontsize: Font size for x-axis label. :type x_label_fontsize: int, optional :param y_tick_fontsize: Font size for y-axis tick labels. :type y_tick_fontsize: int, optional :param y_label_fontsize: Font size for y-axis label. :type y_label_fontsize: int, optional :param legend_fontsize: Font size for the legend. :type legend_fontsize: int, optional :param plt_label_fontsize: Font size for the plot label. :type plt_label_fontsize: int, optional :param planet_name_fontsize: Font size for the planet name. :type planet_name_fontsize: int, optional :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool, optional :returns: The data plot. :rtype: fig (matplotlib figure object) .. py:function:: plot_spectra_retrieved(spectra_median, spectra_low2, spectra_low1, spectra_high1, spectra_high2, planet_name, data_properties, R_to_bin=100, plt_label=None, show_ymodel=True, show_planet_name=True, wl_min=None, wl_max=None, y_min=None, y_max=None, y_unit='transit_depth', colour_list=[], spectra_labels=[], data_colour_list=[], data_labels=[], data_marker_list=[], data_marker_size_list=[], data_alpha_list=[], data_eline_alpha_list=[], data_edge_width_list=[], data_eline_colour_list=[], data_eline_width_list=[], line_width_list=[], line_style_list=[], line_alpha_list=[], binned_colour_list=[], text_annotations=[], annotation_pos=[], err_colour='black', wl_axis='log', figure_shape='default', show_legend=True, legend_location='upper right', legend_box=False, legend_line_size=[], legend_n_columns=0, ax=None, save_fig=True, model=None, show_data_bin_width=True, show_data_cap=True, sigma_to_plot=2, add_retrieved_offsets=False, verbose_offsets=True, add_retrieved_error_inflation=False, xlabels=True, ylabels=True, x_tick_fontsize=12, x_label_fontsize=16, y_tick_fontsize=12, y_label_fontsize=16, legend_fontsize=10, plt_label_fontsize=14, planet_name_fontsize=16, plot_style='standard', fill_between=[], fill_between_alpha=0.5, fill_to_spectrum=[], fill_to_spectrum_list=[], dark_mode=False) Plot a collection of individual model spectra. This function can plot transmission or emission spectra, according to the user's choice of 'y_unit'. :param spectra_median: A list of median spectra to be plotted, each with the format (wl, spec_median). :type spectra_median: list of tuples :param spectra_low2: Corresponding list of -2σ confidence intervals on the retrieved spectra, each with the format (wl, spec_low2). :type spectra_low2: list of tuples :param spectra_low1: Corresponding list of -1σ confidence intervals on the retrieved spectra, each with the format (wl, spec_low1). :type spectra_low1: list of tuples :param spectra_high1: Corresponding list of +1σ confidence intervals on the retrieved spectra, each with the format (wl, spec_high1). :type spectra_high1: list of tuples :param spectra_high2: Corresponding list of +2σ confidence intervals on the retrieved spectra, each with the format (wl, spec_high2). :type spectra_high2: list of tuples :param planet_name: Planet name to overplot on figure. :type planet_name: str :param data_properties: POSEIDON observational data properties dictionary. :type data_properties: dict, optional :param R_to_bin: Spectral resolution (R = wl/dwl) to bin the model spectra to. :type R_to_bin: int, optional :param plt_label: The label for the plot. :type plt_label: str, optional :param show_ymodel: Flag indicating whether to plot the median retrieved spectra binned to the data resolution. :type show_ymodel: bool, optional :param show_planet_name: Flag indicating whether to include the planet name in the top left. :type show_planet_name: bool, optional :param wl_min: The minimum wavelength to plot. :type wl_min: float, optional :param wl_max: The maximum wavelength to plot. :type wl_max: float, optional :param y_min: The minimum value for the y-axis. :type y_min: float, optional :param y_max: The maximum value for the y-axis. :type y_max: float, optional :param y_unit: The unit of the y-axis (Options: 'transit_depth', 'eclipse_depth', '(Rp/Rs)^2', '(Rp/R*)^2', 'Fp/Fs', 'Fp/F*', 'Fp'). :type y_unit: str, optional :param colour_list: A list of colours for the model spectra. :type colour_list: list, optional :param spectra_labels: A list of labels for the model spectra. :type spectra_labels: list, optional :param data_colour_list: A list of colours for the observational data points. :type data_colour_list: list, optional :param data_labels: A list of labels for the observational data. :type data_labels: list, optional :param data_marker_list: A list of marker styles for the observational data. :type data_marker_list: list, optional :param data_marker_size_list: A list of marker sizes for the observational data. :type data_marker_size_list: list, optional :param data_alpha_list: Alpha values for the central circle colours on each data point (defaults to 1.0 if not specified). :type data_alpha_list: list of float, optional :param data_eline_alpha_list: Alpha values for the error bar colours on each data point (defaults to 0.8 if not specified). :type data_eline_alpha_list: list of float, optional :param data_edge_width_list: Border line width for the central circle on each data point (defaults to 0.8 if not specified). :type data_edge_width_list: list of float, optional :param data_eline_colour_list: Colours for data error bars (defaults to 'black' if not specified). :type data_eline_colour_list: list of str, optional :param data_eline_width_list: Line widths for error bars (defaults to 1.0 if not specified). :type data_eline_width_list: list of float, optional :param line_width_list: Line widths for median spectra (defaults to 1.0 if not specified). :type line_width_list: list of float, optional :param line_style_list: Line styles for median spectra (defaults to '-' if not specified). :type line_style_list: list of str, optional :param line_alpha_list: Alpha values for median spectra (defaults to 0.8 if not specified). :type line_alpha_list: list of float, optional :param binned_colour_list: A list of colours for the binned models. :type binned_colour_list: list, optional :param text_annotations: A list of text annotations for Figure decoration (e.g. molecule names) :type text_annotations: list of str, optional :param annotation_pos: (x, y) locations of the text annotations in the previous argument. :type annotation_pos: list of tuples of str, optional :param err_colour: Colour of the data error bars (white works best for a dark background) :type err_colour: string, optional :param wl_axis: The type of x-axis to use ('log' or 'linear'). :type wl_axis: str, optional :param figure_shape: The shape of the figure ('default' or 'wide' - the latter is 16:9). :type figure_shape: str, optional :param show_legend: If False, will not plot legend. :type show_legend: bool, optional :param legend_location: The location of the legend ('upper left', 'upper right', 'lower left', 'lower right', 'outside right'). :type legend_location: str, optional :param legend_box: Flag indicating whether to plot a box surrounding the figure legend. :type legend_box: bool, optional :param legend_line_size: Size of lines in the legend. Put 1 for data points :type legend_line_size: list of float, optional :param legend_n_columns: Manually set the number of columns for the legend. :type legend_n_columns: integer :param ax: Matplotlib axis provided externally. :type ax: matplotlib axis object, optional :param save_fig: If True, saves a PDF in the POSEIDON output folder. :type save_fig: bool, optional :param model: POSEIDON model dictionary. Required to be defined for offsets to be added. :type model: dict, optional :param show_data_bin_width: Flag indicating whether to plot x bin widths for data points. :type show_data_bin_width: bool, optional :param show_data_cap: Flag indicating whether to plot the error bar caps on the data points. :type show_data_cap: bool, optional :param sigma_to_plot: How many sigma contours to plot (0 for only median, 1 for median and 1 sigma, or 2 for median, 1 sigma, and 2 sigma). :type sigma_to_plot: int, optional :param add_retrieved_offsets: Plots data with retrieved offset values. :type add_retrieved_offsets: bool, optional :param add_retrieved_error_inflation: Plots data error bars including retrieved error inflation value. :type add_retrieved_error_inflation: bool, optional :param verbose offsets: Will print out offsets applied to which datasets. :type verbose offsets: bool, optional :param x_labels: If false, will remove x_ticks and x_label. :type x_labels: bool, optional :param y_labels: If false, will remove y_ticks and y_label. :type y_labels: bool, optional :param legend_n_columns: Manually set the number of columns for the legend. :type legend_n_columns: integer :param x_tick_fontsize: Font size for x-axis tick labels. :type x_tick_fontsize: int, optional :param x_label_fontsize: Font size for x-axis label. :type x_label_fontsize: int, optional :param y_tick_fontsize: Font size for y-axis tick labels. :type y_tick_fontsize: int, optional :param y_label_fontsize: Font size for y-axis label. :type y_label_fontsize: int, optional :param legend_fontsize: Font size for the legend. :type legend_fontsize: int, optional :param plt_label_fontsize: Font size for the plot label. :type plt_label_fontsize: int, optional :param planet_name_fontsize: Font size for the planet name. :type planet_name_fontsize: int, optional :param plot_style: (Experimental!) plot style ('standard' or 'fancy'). :type plot_style: str, optional :param fill_between: If True, spectrum will have a fill color from its line to 0 or fill_to_spectrum. :type fill_between: list of bools, optional :param fill_between_alpha: Alpha of the fill region. :type fill_between_alpha: int, optional :param fill_to_spectrum: If non-empty, will fill spectra to this spectrum (instead of 0). :type fill_to_spectrum: list of ints, optional :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool, optional :returns: The retrieved spectra plot. :rtype: fig (matplotlib figure object) .. py:function:: plot_PT_retrieved(planet_name, PT_median, PT_low2, PT_low1, PT_high1, PT_high2, T_true=None, Atmosphere_dimension=1, TwoD_type=None, plt_label=None, show_profiles=[], PT_labels=[], colour_list=[], log_P_min=None, log_P_max=None, T_min=None, T_max=None, legend_location='lower left', ax=None, save_fig=True, sigma_to_plot=2, show_legend=True, custom_ticks=[], ylabels=True, retrieved_log_P_surf=[], log_P_surf_sigma_upper_lower='upper', log_P_surf_histogram_list=[], dark_mode=False) Plot retrieved Pressure-Temperature (P-T) profiles. :param planet_name: The name of the planet. :type planet_name: str :param PT_median: List of tuples containing the median temperature and pressure grids for each model, each with the format (T_median, P). :type PT_median: list of tuples :param PT_low2: Corresponding list of -2σ confidence intervals on the retrieved temperature, each with the format (T_low2, P). :type PT_low2: list of tuples :param PT_low1: Corresponding list of -1σ confidence intervals on the retrieved temperature, each with the format (T_low1, P). :type PT_low1: list of tuples :param PT_high1: Corresponding list of +1σ confidence intervals on the retrieved temperature, each with the format (T_high1, P). :type PT_high1: list of tuples :param PT_high2: Corresponding list of +2σ confidence intervals on the retrieved temperature, each with the format (T_high2, P). :type PT_high2: list of tuples :param T_true: True temperature profile (optional). :type T_true: np.array, optional :param Atmosphere_dimension: Dimensionality of the atmospheric model. :type Atmosphere_dimension: int, optional :param TwoD_type: If 'Atmosphere_dimension' = 2, the type of 2D model (Options: 'D-N' for day-night, 'E-M' for evening-morning). :type TwoD_type: str, optional :param plt_label: List of labels for each model. :type plt_label: list, optional :param show_profiles: If model is 2D or 3D, which profiles to plot. :type show_profiles: list, optional :param PT_labels: List of labels for each retrieved P-T profile. :type PT_labels: list, optional :param colour_list: List of colours for each retrieved P-T profile. log_P_min (float, optional): Minimum value for the log10 pressure. log_P_max (float, optional): Maximum value for the log10 pressure. T_min (float, optional): Minimum temperature to plot. T_max (float, optional): Maximum temperature to plot. legend_location (str, optional): Location of the legend. Default is 'lower left'. show_legend (bool, optional): If False, will not show legend. :type colour_list: list, optional :param custom_ticks: Major and minor ticks :type custom_ticks: list, optional :param ylabels: If False, will not plot y ticks :type ylabels: bool, optional :param retrieved_log_P_surf: Will overplot 1 sigma P_surf (Retrieved log_P_surf, one_sigma_positive, one_sigma_negative) :type retrieved_log_P_surf: list, optional :param log_P_surf_sigma_upper_lower: Will set things depending on if its an upper or lower limit or unconstrained. :type log_P_surf_sigma_upper_lower: str, optional :param log_P_surf_histogram_list: When plotting a histogram of the retrieved log_P_surf values, set to True for each model to be plotted. :type log_P_surf_histogram_list: list, optional :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool, optional :rtype: fig (matplotlib figure object) The retrieved P-T profile plot. .. py:function:: plot_chem_retrieved(planet_name, chemical_species, log_Xs_median, log_Xs_low2, log_Xs_low1, log_Xs_high1, log_Xs_high2, log_X_true=None, plot_species=[], plot_two_sigma=False, Atmosphere_dimension=1, TwoD_type=None, plt_label=None, show_profiles=[], model_labels=[], colour_list=[], log_P_min=None, log_P_max=None, log_X_min=None, log_X_max=None, chem_labels=[], legend_location='upper right', show_legend=True, ax=None, save_fig=True, sigma_to_plot=1, dark_mode=False) Plot retrieved mixing ratio profiles. Supports multi-region models (e.g. dayside/nightside) when the user supplies one entry per region in the log_Xs_* collections (produced by calling read_retrieved_log_X once per region and appending via plot_collection). Each region is distinguished by line style while colours denote chemical species. :param planet_name: The name of the planet. :type planet_name: str :param chemical_species: List of chemical species included in the model (including bulk species). :type chemical_species: list :param log_Xs_median: List of tuples, one per region or model, each containing the median retrieved log10 mixing ratio array (N_species x N_layers) and the pressure grid, with the format (log10 X_median, P). :type log_Xs_median: list of tuples :param log_Xs_low2: Corresponding list of -2 sigma confidence intervals on the retrieved log10 mixing ratio for each region, each with the form (log10 X_low2, P). :type log_Xs_low2: list of tuples :param log_Xs_low1: Corresponding list of -1 sigma confidence intervals on the retrieved log10 mixing ratio for each region, each with the form (log10 X_low1, P). :type log_Xs_low1: list of tuples :param log_Xs_high1: Corresponding list of +1 sigma confidence intervals on the retrieved log10 mixing ratio for each region, each with the form (log10 X_high1, P). :type log_Xs_high1: list of tuples :param log_Xs_high2: Corresponding list of +2 sigma confidence intervals on the retrieved log10 mixing ratio for each region, each with the form (log10 X_high2, P). :type log_Xs_high2: list of tuples :param log_X_true: True log10 mixing ratio profiles for each chemical species. :type log_X_true: 2D np.array, optional :param plot_species: List of chemical species to plot. If not specified, default to all chemical species in the model (including bulk species). :type plot_species: list, optional :param plot_two_sigma: If False, only plots the median and +/- 1 sigma confidence intervals for each chemical species (default behaviour to avoid clutter). :type plot_two_sigma: bool, optional :param Atmosphere_dimension: Dimensionality of the atmospheric model (kept for backward compatibility but no longer restricts plotting). :type Atmosphere_dimension: int, optional :param TwoD_type: If 'Atmosphere_dimension' = 2, the type of 2D model (Options: 'D-N' for day-night, 'E-M' for evening-morning). :type TwoD_type: str, optional :param plt_label: Label used in the output filename. :type plt_label: str, optional :param show_profiles: If model is 2D or 3D, which profiles to plot. :type show_profiles: list, optional :param model_labels: List of labels for each retrieved model (only used when a single region is provided). For multi-region plots use chem_labels instead. :type model_labels: list, optional :param colour_list: List of colours for each chemical species plotted. :type colour_list: list, optional :param log_P_min: Minimum value for the log10 pressure. :type log_P_min: float, optional :param log_P_max: Maximum value for the log10 pressure. :type log_P_max: float, optional :param log_X_min: Minimum log10 mixing ratio to plot. :type log_X_min: float, optional :param log_X_max: Maximum log10 mixing ratio to plot. :type log_X_max: float, optional :param chem_labels: Labels for each region entry (e.g. ['dayside', 'nightside']). If not specified, regions are numbered. :type chem_labels: list, optional :param legend_location: Location of the legend. Default is 'upper right'. :type legend_location: str, optional :param show_legend: If True, show legend on the plot. :type show_legend: bool, optional :param ax: If provided, plots on the given axis instead of creating a new figure. :type ax: matplotlib axis, optional :param save_fig: If True, saves the figure to disk. :type save_fig: bool, optional :param sigma_to_plot: How many sigma confidence regions to shade (1 or 2). Default is 1. :type sigma_to_plot: int, optional :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool, optional :returns: The retrieved mixing ratio profile plot. :rtype: fig (matplotlib figure object) .. py:function:: plot_stellar_flux(flux, wl, wl_min=None, wl_max=None, flux_min=None, flux_max=None, flux_axis='linear', wl_axis='log', dark_mode=False) Straightforward function to plot an emergent stellar spectrum. :param flux: Surface flux of the star as a function of wavelength. :type flux: np.array :param wl: Corresponding wavelength array. :type wl: np.array :param wl_min: Minimum wavelength for x axis. :type wl_min: float, optional :param wl_max: Maximum wavelength for x axis. :type wl_max: float, optional :param flux_min: Minimum flux for y axis. :type flux_min: float, optional :param flux_max: Maximum flux for y axis. :type flux_max: float, optional :param flux_axis: 'linear' or 'log' axis scaling for the y-axis. Default is 'linear'. :type flux_axis: str, optional :param wl_axis: 'linear' or 'log' axis scaling for the x-axis. Default is 'log'. :type wl_axis: str, optional :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool, optional :returns: The simplest stellar flux plot you've ever seen. :rtype: fig (matplotlib figure object) .. py:function:: plot_histogram(nbins, vals, colour, ax, shrink_factor, x_max_array, alpha_hist, orientation) Function to plot a histogram of parameter values. :param nbins: Number of bins for the histogram. :type nbins: int :param vals: List of parameter values for each model. :type vals: list :param colour: Colour for the histogram. :type colour: str :param ax: Axis to plot on. :type ax: matplotlib axis object :param shrink_factor: Factor to shrink the y-axis. :type shrink_factor: float :param x_max_array: Array of maximum x values for scaling. :type x_max_array: np.array :param alpha_hist: Alpha value for histogram bars. :type alpha_hist: float :returns: Confidence intervals for the parameter values. :rtype: low3, low2, low1, median, high1, high2, high3 .. py:function:: plot_parameter_panel(ax, param_vals, N_bins, param_min, param_max, colour, x_max_array, alpha_hist, orientation) Setup function to plot the histogram panel for a given parameter. :param ax: Axis to plot on. :type ax: matplotlib axis object :param param_vals: List of parameter values for each model. :type param_vals: list :param N_bins: Number of bins for the histogram. :type N_bins: int :param param_min: Minimum value for the parameter. :type param_min: float :param param_max: Maximum value for the parameter. :type param_max: float :param colour: Colour for the histogram. :type colour: str :param x_max_array: Array of maximum x values for scaling. :type x_max_array: np.array :param alpha_hist: Alpha value for histogram bars. :type alpha_hist: float :returns: Lower 1σ confidence interval. median (float): Median value. high1 (float): Upper 1σ confidence interval. :rtype: low1 (float) .. py:function:: plot_retrieved_parameters(axes_in, param_vals, plot_parameters, parameter_colour_list, retrieval_colour_list, retrieval_labels, span, truths, N_rows, N_columns, N_bins, vertical_lines, vertical_lines_colors, tick_labelsize=8, title_fontsize=12, title_vert_spacing=0.2, custom_labels=[], custom_ticks=[], alpha_hist=0.4, show_title=True, two_sigma_upper_limits_full=[], two_sigma_lower_limits_full=[], orientation='vertical', title_alpha_list=[], use_parameter_color_for_title=False, title_colour_list=[], dark_mode=False) Plot retrieved parameters as histograms. :param axes_in: List of axes to plot on. If empty, new axes will be created. :type axes_in: list :param param_vals: List of parameter values for each model. :type param_vals: list :param plot_parameters: List of parameters to plot. :type plot_parameters: list :param parameter_colour_list: List of colours for each parameter. :type parameter_colour_list: list :param retrieval_colour_list: List of colours for each retrieval. :type retrieval_colour_list: list :param retrieval_labels: List of labels for each retrieval. :type retrieval_labels: list :param span: List of min and max values for each parameter. :type span: list :param truths: True values for each parameter. :type truths: list :param N_rows: Number of rows in the plot grid. :type N_rows: int :param N_columns: Number of columns in the plot grid. :type N_columns: int :param N_bins: Number of bins for each histogram. :type N_bins: list :param vertical_lines: Vertical lines to plot on the histograms. :type vertical_lines: list :param vertical_lines_colors: Colours for the vertical lines. :type vertical_lines_colors: list :param tick_labelsize: Font size for tick labels. Default is 8. :type tick_labelsize: int, optional :param title_fontsize: Font size for titles. Default is 12. :type title_fontsize: int, optional :param title_vert_spacing: Vertical spacing between titles. Default is 0.2. :type title_vert_spacing: float, optional :param custom_labels: Custom labels for the parameters. Default is empty list. :type custom_labels: list, optional :param custom_ticks: Custom ticks for the parameters. Default is empty list. :type custom_ticks: list, optional :param alpha_hist: Alpha value for histogram bars. Default is 0.4. Can be a list for multiple histograms stacked. :type alpha_hist: float or list of floats, optional :param show_title: Whether to show titles on the plots. Default is True. :type show_title: bool, optional :param two_sigma_upper_limits_full: Upper limits for two sigma confidence intervals. Default is empty list. :type two_sigma_upper_limits_full: 1D or 2D list of str, optional :param two_sigma_lower_limits_full: Lower limits for two sigma confidence intervals. Default is empty list. :type two_sigma_lower_limits_full: 1D or 2D list of str, optional :param use_parameter_color_for_title: If true, will use parameter color for title and constraints. :type use_parameter_color_for_title: bool :param title_colour_list: List of colours to use for titles and constraints if use_parameter_color_for_title is False. :type title_colour_list: list of str :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool, optional :returns: The retrieved parameters plot. :rtype: fig (matplotlib figure object) .. py:function:: elemental_ratio_samples(all_species, X_vals, element_1, element_2) Helper function to calculate the abundance ratio between any two elements in the atmosphere. Example: to compute the C/O ratio, use element_1 = 'C' and element_2 = 'O'. :param all_species: List of all chemical species included in the model. :type all_species: np.array of str :param X_vals: Mixing ratio samples. :type X_vals: 2D np.array of float :param element_1: First element in ratio. :type element_1: str :param element_2: First element in ratio. :type element_2: str :returns: Abundance ratio samples. :rtype: element_ratio (np.array of float) .. py:function:: plot_histograms(planet, models, plot_parameters, parameter_colour_list=[], retrieval_colour_list=[], retrieval_labels=[], span=[], truths=[], N_bins=[], N_rows=None, N_columns=None, axes=[], retrieval_codes=[], external_samples=[], external_param_names=[], plt_label=None, save_fig=True, show_title=True, vertical_lines=[], vertical_line_colors=[], tick_labelsize=None, title_fontsize=None, title_vert_spacing=None, custom_labels=[], custom_ticks=[], alpha_hist=0.4, two_sigma_upper_limits=[], two_sigma_lower_limits=[], orientation='vertical', title_alpha_list=[], use_parameter_color_for_title=False, title_colour_list=[], dark_mode=False) Plot a set of histograms from one or more retrievals. :param planet: Dictionary containing the planet properties. :type planet: dict :param models: List of dictionaries containing the model properties. :type models: list of dicts :param plot_parameters: List of parameters to plot. :type plot_parameters: list of str :param parameter_colour_list: List of colours for each parameter. :type parameter_colour_list: list of str, optional :param retrieval_colour_list: List of colours for each retrieval model. :type retrieval_colour_list: list of str, optional :param retrieval_labels: List of labels for each retrieval model. :type retrieval_labels: list of str, optional :param span: Span for each parameter to plot. :type span: list of float, optional :param truths: True values for each parameter. :type truths: list of float, optional :param N_bins: Number of bins for each histogram. :type N_bins: list of int, optional :param N_rows: Number of rows in the figure. Default is None. :type N_rows: int, optional :param N_columns: Number of columns in the figure. Default is None. :type N_columns: int, optional :param axes: List of axes to plot on. Default is empty list. :type axes: list of matplotlib axes, optional :param retrieval_codes: List of retrieval codes for each model. Default is empty list. :type retrieval_codes: list of str, optional :param external_samples: List of external samples for each model. Default is empty list. :type external_samples: list of np.array, optional :param external_param_names: List of external parameter names for each model. Default is empty list. :type external_param_names: list of list of str, optional :param plt_label: Label for the plot file name. Default is None. :type plt_label: str, optional :param save_fig: Whether to save the figure or not. Default is True. :type save_fig: bool, optional :param show_title: Whether to show the title or not. Default is True. :type show_title: bool, optional :param vertical_lines: List of vertical lines to plot. Default is empty list. :type vertical_lines: list of float, optional :param vertical_line_colors: List of colors for vertical lines. Default is empty list. :type vertical_line_colors: list of str, optional :param tick_labelsize: Font size for tick labels. If None and axes provided, will auto-scale based on figure size. Default is None. :type tick_labelsize: int, optional :param title_fontsize: Font size for titles. If None and axes provided, will auto-scale based on figure size. Default is None. :type title_fontsize: int, optional :param title_vert_spacing: Vertical spacing between titles. If None and axes provided, will auto-scale based on title font size. Default is None. :type title_vert_spacing: float, optional :param custom_labels: Custom labels for the parameters. Default is empty list. :type custom_labels: list of str, optional :param custom_ticks: Custom ticks for the x-axis. Default is empty list. :type custom_ticks: list of list of float, optional :param alpha_hist: Transparency for the histograms. Default is 0.4. Can be a list (for each histogram) :type alpha_hist: float or list of floats, optional :param two_sigma_upper_limits: List of parameters with two sigma upper limits. Default is empty list. If 1D, will apply two_sigma_upper_limit to all models. If 2D, will only do it for specific models. :type two_sigma_upper_limits: 1D or 2D list of str, optional :param two_sigma_lower_limits: List of parameters with two sigma lower limits. Default is empty list. If 1D, will apply two_sigma_lower_limit to all models. If 2D, will only do it for specific models. :type two_sigma_lower_limits: 1D or 2D list of str, optional :param title_alpha_list: If multiple models or retrievals are being plotted, can set One or more alphas in the cascade of titles on top of histogram. :type title_alpha_list: list of float :param use_parameter_color_for_title: If true, will use parameter color for title and constraints. :type use_parameter_color_for_title: bool :param title_colour_list: List of colours to use for titles and constraints if use_parameter_color_for_title is False. :type title_colour_list: list of str :param dark_mode: If True, uses a dark background with white text and axes. Defaults to False (light mode). :type dark_mode: bool, optional .. py:function:: vary_one_parameter_PT(model, planet, param_name, vary_list, P, P_ref, R_p_ref, PT_params_og, log_X_params_og, cloud_params_og, ax=None, legend_location='upper right') This function is used in the tutorial notebooks to show how turning a knob on a parameter changes the resulting PT profile. :param model: A specific description of a given POSEIDON model. :type model: dict :param planet: Collection of planetary properties used by POSEIDON. :type planet: dict :param param_name: Name of the parameter to vary :type param_name: string :param vary_list: Array containing values to test :type vary_list: array of float :param P: Model pressure grid (bar). :type P: np.array of float :param P_ref: Reference pressure (bar). :type P_ref: float :param R_p_ref: Planet radius corresponding to reference pressure (m). :type R_p_ref: float :param PT_params_og: Original parameters defining the pressure-temperature field. :type PT_params_og: np.array of float :param log_X_params_og: Original parameters defining the log-mixing ratio field. :type log_X_params_og: np.array of float :param cloud_params_og: Original parameters defining atmospheric aerosols. :type cloud_params_og: np.array of float :param legend_location: The location of the legend ('upper left', 'upper right', 'lower left', 'lower right'). :type legend_location: str, optional :param ax: Matplotlib axis provided externally. :type ax: matplotlib axis object, optional :returns: Outputs a plot of resultant spectra with the param_name at the vary_list values.