Skip to content

module plot


function plot_PCA

plot_PCA(
    fig: Figure,
    data1: ndarray,
    pc1: int = 0,
    pc2: int = 1,
    data2: ndarray | None = None,
    labels: Union[List[str], str] = 'Data',
    colors: Union[List[str], str] = 'black',
    title: str | None = None
) → Figure

Makes the scatter plot of the components (pc1, pc2) of the input data and shows the histograms of the components.

Args:

  • fig (plt.figure): Figure to plot the data.
  • data1 (np.ndarray): Data to plot.
  • pc1 (int, optional): First principal direction. Defaults to 0.
  • pc2 (int, optional): Second principal direction. Defaults to 1.
  • data2 (np.ndarray | None, optional): Data to be superimposed to data1. Defaults to None.
  • labels (List[str] | str, optional): Labels to put in the legend. Defaults to "Data".
  • colors (List[str] | str, optional): Colors to be used. Defaults to "black".
  • title (str | None, optional): Title of the plot. Defaults to None.

Returns:

  • Figure: Updated figure.

function plot_pearson_sampling

plot_pearson_sampling(
    ax: Axes,
    checkpoints: ndarray,
    pearsons: ndarray,
    pearson_training: ndarray | None = None
)

Plots the Pearson correlation coefficient over sampling time.

Args:

  • ax (Axes): Axes to plot the data.
  • checkpoints (np.ndarray): Checkpoints of the sampling.
  • pearsons (np.ndarray): Pearson correlation coefficients at different checkpoints.
  • pearson_training (np.ndarray | None, optional): Pearson correlation coefficient obtained during training. Defaults to None.

Returns:

  • Axes: Updated axes.

function plot_autocorrelation

plot_autocorrelation(
    ax: Axes,
    checkpoints: ndarray,
    autocorr: ndarray,
    gen_seqid: float,
    data_seqid: float
) → Axes

Plots the time-autocorrelation curve of the sequence identity and the generated and data sequence identities.

Args:

  • ax (Axes): Axes to plot the data.
  • checkpoints (np.ndarray): Checkpoints of the sampling.
  • autocorr (np.ndarray): Time-autocorrelation of the sequence identity.
  • gen_seqid (float): Sequence identity of the generated data.
  • data_seqid (float): Sequence identity of the data.

Returns:

  • Axes: Updated axes.

function plot_scatter_correlations

plot_scatter_correlations(
    ax: Tuple[Axes, Axes],
    Cij_data: ndarray,
    Cij_gen: ndarray,
    Cijk_data: ndarray,
    Cijk_gen: ndarray,
    pearson_Cij: float,
    pearson_Cijk: float
) → Axes

Plots the scatter plot of the data and generated Cij and Cijk values.

Args:

  • ax (Axes): Axes to plot the data. Must have 2 subplots.
  • Cij_data (np.ndarray): Data Cij values.
  • Cij_gen (np.ndarray): Generated Cij values.
  • Cijk_data (np.ndarray): Data Cijk values.
  • Cijk_gen (np.ndarray): Generated Cijk values.
  • pearson_Cij (float): Pearson correlation coefficient of Cij.
  • pearson_Cijk (float): Pearson correlation coefficient of Cijk.

Returns:

  • plt.Axes: Updated axes.

function plot_contact_map

plot_contact_map(ax: Axes, cm: ndarray, title: str | None = None) → Axes

Plots the contact map.

Args:

  • ax (Axes): Axes to plot the contact map.
  • cm (np.ndarray): Contact map to plot.
  • title (str | None, optional): Title of the plot. Defaults to None.

Returns:

  • Axes: Updated axes.

This file was automatically generated via lazydocs.