Plotting

radvel.plotting.add_anchored(*args, **kwargs)[source]
Parameters:
  • s (string) – Text.
  • loc (str) – Location code.
  • pad (float, optional) – Pad between the text and the frame as fraction of the font size.
  • borderpad (float, optional) – Pad between the frame and the axes (or bbox_to_anchor).
  • prop (matplotlib.font_manager.FontProperties) – Font properties.
radvel.plotting.corner_plot(post, chains, saveplot=None)[source]

Make a corner plot from the output MCMC chains and a posterior object.

Parameters:
  • post (radvel.Posterior) – Radvel posterior object
  • chains (DataFrame) – MCMC chains output by radvel.mcmc
  • saveplot (str, optional) – Name of output file, will show as interactive matplotlib window if not defined.
Returns:

None

radvel.plotting.corner_plot_derived_pars(chains, planet, saveplot=None)[source]

Make a corner plot from the output MCMC chains and a posterior object.

Parameters:
  • chains (DataFrame) – MCMC chains output by radvel.mcmc
  • planet (Planet object) – Planet configuration object
  • (Optional[string] (saveplot) – Name of output file, will show as interactive matplotlib window if not defined.
Returns:

None

radvel.plotting.correlation_plot(post, outfile=None)[source]

Correlation plot

Plot parameter correlations.

Parameters:
  • post (radvel.Posterior) – Radvel Posterior object
  • outfile (string) – name of output multi-page PDF file
Returns:

None

radvel.plotting.rv_multipanel_plot(post, saveplot=None, telfmts={}, nobin=False, yscale_auto=False, yscale_sigma=3.0, nophase=False, epoch=2450000, uparams=None, phase_ncols=None, phase_nrows=None, legend=True, rv_phase_space=0.08)[source]

Multi-panel RV plot to display model using post.params orbital parameters.

Parameters:
  • post (radvel.Posterior) – Radvel posterior object. The model plotted will be generated from post.params
  • saveplot (string, optional) – Name of output file, will show as interactive matplotlib window if not defined.
  • nobin (bool, optional) – If True do not show binned data on phase plots. Will default to True if total number of measurements is less then 20.
  • yscale_auto (bool, optional) – Use matplotlib auto y-axis scaling (default: False)
  • yscale_sigma (float, optional) – Scale y-axis limits to be +/- yscale_sigma*(RMS of data plotted) if yscale_auto==False
  • telfmts (dict, optional) – dictionary of dictionaries mapping instrument code to plotting format code.
  • nophase (bool, optional) – Will omit phase-folded plots if true
  • epoch (float, optional) – Subtract this value from the time axis for more compact axis labels (default: 245000)
  • uparams (dict, optional) – parameter uncertainties, must contain ‘per’, ‘k’, and ‘e’ keys.
  • phase_ncols (int, optional) – number of columns in the phase folded plots. Default behavior is 1.
  • phase_nrows (int, optional) – number of columns in the phase folded plots. Default is nplanets.
  • legend (bool, optional) – include legend on plot? (default: True)
  • rv_phase_space (float, optional) – verticle space between rv plot and phase-folded plots (in units of fraction of figure height)
Returns:

current matplotlib figure object list: list of axis objects

Return type:

figure

radvel.plotting.trend_plot(post, chains, nwalkers, outfile=None)[source]

MCMC trend plot

Make a trend plot to show the evolution of the MCMC as a function of step number.

Parameters:
  • post (radvel.Posterior) – Radvel Posterior object
  • chains (DataFrame) – MCMC chains output by radvel.mcmc
  • nwalkers (int) – number of walkers used in this particular MCMC run
  • outfile (string) – name of output multi-page PDF file
Returns:

None