phylojunction.plotting package

Submodules

phylojunction.plotting.pj_draw module

phylojunction.plotting.pj_draw.plot_intervals(fig_obj: Figure, axes_obj: Axes, df: DataFrame, x: str, y: str, xlab: str | None = None, ylab: str | None = 'Posterior mean') None

Draw coverage plot on provided plt.Figure instance

Parameters:
  • fig_obj (matplotlib.Figure) – Figure object

  • axes_obj (plt.Axes) – Axes object

  • df (pd.DataFrame) – pandas dataframe holding interval information

  • x (str) – Label for x-axis on pandas dataframe.

  • y (str, optional) – Label for y-axis on pandas dataframe. Defaults to “posterior_mean”.

  • xlab (ty.Optional[str], optional) – User-provided overriding label for x-axis. Defaults to None.

  • ylab (ty.Optional[str], optional) – User-provided overriding

  • None. (label for y-axis. Defaults to) –

Returns:

None

phylojunction.plotting.pj_draw.plot_violins(fig: Figure, ax: Axes, df: DataFrame, x: str, y: str, xlab: str | None = None, ylab: str | None = None) None

Draw violin plots, one variable and 2+ factors

Parameters:
  • fig (matplotlib.Figure) – Figure object

  • ax (plt.Axes) – Axes object

  • df (pd.DataFrame) – pandas DataFrame with values for a variable (column 1) in two or more scenarios (column 2), i.e., two or more factors (e.g., different simulators)

  • xlab (str) – x-axis label. Defaults to None.

  • ylab (str) – y-axis label. Defaults to None.

Returns:

None

phylojunction.plotting.pj_organize module

phylojunction.plotting.pj_organize.add_within_hpd_col(df: DataFrame, val_col_name: str) DataFrame

Add column (1 or 0) if in or out of HPD

Parameters:
  • df (pd.DataFrame) – DataFrame

  • val_col_name (str) – Name of column containing value

Returns:

Input dataframe with new column

Return type:

pd.DataFrame

phylojunction.plotting.pj_organize.join_dataframes(pj_df: DataFrame, compare_to_df: DataFrame, thing_to_compare: str, summaries_avg_over_repl: bool = False) DataFrame

_summary_

Parameters:
  • pj_df (pd.DataFrame) – _description_

  • compare_to_df (pd.DataFrame) – _description_

  • value_to_compare (str) – _description_

  • summaries_avg_over_repl (bool, optional) – _description_. Defaults to False.

Returns:

_description_

Return type:

pd.DataFrame

phylojunction.plotting.pj_seeing_colors module

phylojunction.plotting.pj_seeing_colors.truncate_colormap(cmap, minval=0.0, maxval=1.0, n=100)

phylojunction.plotting.pj_testing_tree_plotting module

Module contents