liana.plotting.target_metrics¶
- liana.plotting.target_metrics(misty=None, stat=None, target_metrics=None, top_n=None, ascending=False, key=None, filter_fun: callable | None = None, figure_size: tuple = (5, 5), aggregate_fun=None, return_fig: bool = True)¶
Plot target metrics.
- Parameters:
- misty
MistyData object with modelling results
- statstr
Statistic to plot
- target_metrics
A target_metrics DataFrame
- top_n
top_n
entities to plot.- ascendingbool
Whether to sort in ascending order
- keycallable
Function to use to sort the dataframe
- filter_fun
A function, applied along the columns (axis=1), used to filter the results to be plotted.
- aggregate_fun
A function used to aggregate the results to be plotted.
- figure_size
Figure x,y size
- return_fig
bool whether to return the fig object.
- Returns:
- Returns a plotnine plot.