ALLCools.plot

Package Contents

categorical_scatter(data, ax, coord_base='umap', x=None, y=None, hue=None, palette='auto', text_anno=None, text_anno_kws=None, text_anno_palette=None, text_transform=None, dodge_text=False, dodge_kws=None, show_legend=False, legend_kws=None, s=5, size=None, sizes: dict = None, size_norm=None, axis_format='tiny', max_points=5000, labelsize=4, linewidth=0, zoomxy=1.05, outline=None, outline_pad=3, outline_kws=None, scatter_kws=None, return_fig=False, rasterized='auto')
Plot scatter plot with these options:
  • Color by a categorical variable, and generate legend of the variable if needed

  • Add text annotation using a categorical variable

  • Circle categories with outlines

Parameters
  • data – Dataframe that contains coordinates and categorical variables

  • ax – this function do not generate ax, must provide an ax

  • coord_base – coords name, if provided, will automatically search for x and y

  • x – x coord name

  • y – y coord name

  • hue – categorical col name or series for color hue

  • palette – palette of the hue, str or dict

  • text_anno – categorical col name or series for text annotation

  • text_anno_kws

  • text_anno_palette

  • text_transform

  • dodge_text

  • dodge_kws

  • show_legend

  • legend_kws

  • s

  • size

  • sizes

  • size_norm

  • axis_format

  • max_points

  • labelsize

  • linewidth

  • zoomxy

  • outline

  • outline_pad

  • outline_kws

  • scatter_kws – kws dict pass to sns.scatterplot

continuous_scatter(data, ax, coord_base='umap', x=None, y=None, scatter_kws=None, hue=None, hue_norm=None, hue_portion=0.95, cmap='viridis', colorbar=True, colorbar_label_kws=None, size=None, size_norm=None, size_portion=0.95, sizes=None, sizebar=True, text_anno=None, dodge_text=False, dodge_kws=None, text_anno_kws=None, text_anno_palette=None, text_transform=None, axis_format='tiny', max_points=5000, s=5, labelsize=4, linewidth=0.5, cax=None, zoomxy=1.05, outline=None, outline_kws=None, outline_pad=2, return_fig=False, rasterized='auto')[source]
interactive_scatter(data, hue=None, coord_base='umap', continous_cmap='viridis', size=5, max_points=3000)

Plot an interactive scatter plot with plotly

Parameters
  • data

  • hue

  • coord_base

  • continous_cmap

  • size

  • max_points

add_ax_box(ax, expend=0, **patch_kws)[source]
sunbrust(pie_data, ax, hue=None, hue_portion=0.5, cmap='viridis', colorbar=True, colorbar_kws=None, inner_radius=0.25, outer_radius=1, anno_col=None, text_anno='text', anno_layer_size=0.05, col_color_dict=None, startangle=0, anno_ang_min=5, anno_border=1.2, text_expend=1.05, uniform_section=False, order_dict=None)[source]
Parameters
  • pie_data – Tidy dataframe

  • ax

  • hue

  • hue_portion

  • cmap

  • colorbar

  • colorbar_kws

  • inner_radius

  • outer_radius

  • anno_col

  • text_anno

  • anno_layer_size

  • col_color_dict

  • startangle

  • anno_ang_min

  • anno_border

  • text_expend

  • uniform_section

  • order_dict

plot_decomp_scatters(adata, n_components, base_name='PC', obsm_name='X_pca', hue=None, palette='viridis', hue_quantile=(0.25, 0.75), nrows=5, ncols=5)[source]
plot_dendrogram(linkage_df, ax, dendro=None, labels=None, dendro_kws=None, plot_node_id=False, plot_non_singleton=True, plot_kws=None, node_hue=None, node_hue_norm=None, node_hue_cbar=True, node_hue_cbar_frac=0.1, node_palette='viridis', node_size=None, node_size_norm=None, node_sizes=None, line_hue=None, line_hue_norm=None, line_palette='gray_r', linewidth=1.5, edge_color='gray', marker_size=60, marker_color='lightblue')[source]
Parameters
  • linkage_df

  • dendro

  • labels

  • dendro_kws

  • ax

  • plot_node_id

  • plot_non_singleton

  • plot_kws

  • node_hue

  • node_hue_norm

  • node_hue_cbar

  • node_hue_cbar_frac

  • node_palette

  • node_size

  • node_size_norm

  • node_sizes

  • line_hue

  • line_hue_norm

  • line_palette

  • linewidth

  • edge_color

  • marker_size

  • marker_color