asi_core.visualization.density_scatter¶
Functions¶
|
Create density plot with defined grid size allowing to interpret color code quantitatively. |
Module Contents¶
- asi_core.visualization.density_scatter.plot_density(x, y, pairs=False, ax=None, xlabel=None, ylabel=None, title='', xlim=(None, None), ylim=(None, None), cbar_scale='linear', cbar_lim=(None, None), metrics=None, quantiles=False, quan_bin_num=10, save=False, cut_bins=True, print_perc_legend=True, print_metrics_box=True)¶
Create density plot with defined grid size allowing to interpret color code quantitatively.
- Parameters:
x – (list, DataFrame column) x-axis values
y – (list, DataFrame column) y-axis values
pairs – (bool) If True, parity plot will be produced (equal aspect and angle bisecting)
ax – (matplotlib axis) Here a subplots axis can be passed. If None, a single plot will be returned
xlabel – (str) Custom xlabel
ylabel – (str) Custom ylabel
title – (str) Desired plot title
xlim – (tuple) x-axis limits
ylim – (tuple) y-axis limits
cbar_scale – (string) use ‘linear’ or ‘log’ color coding and colorbar
cbar_lim – (tuple) Limits of colorbar
metrics – (str) Choose between rel for relative or abs for absolute or both
quantiles – (bool) If True, 5%, 25%, 50%, 75%, and 95% quantiles will be plotted
quan_bin_num – (int) Number of bins for quantiles
save – (bool or str) If Truthy, plot is saved as pickle. If truthy str, file is named to the value of save
cut_bins – If False, bin edges will not cut the x values
print_perc_legend – If True, print a legend describing plotted percentiles
print_metrics_box – If True, print deviation metrics in plot