PlotUtils#
Plotting routines for ClearMap based on matplotlib.
Note
This module is using matplotlib.
- gp_stats_df_to_counts(df)[source]#
stack the df by group name The only counts are the average for the group A new column identifies the group. It is aimed to make it interchangeable with the DF of an individual sample
- Parameters:
pd.DataFrame (Returns)
pd.DataFrame
-------
- plot_curve(coordinates, **kwargs)[source]#
Plot a curve in 3d.
Arguments
- coordinatesnx3 array.
The coordinates of the curve.
- kwargs
Matplotlib parameter.
Returns
- axax
3d axes object.
- plot_density(points, plot_points=True, plot_contour=True, plot_contour_lines=10, n_bins=100, color=None, cmap=<matplotlib.colors.LinearSegmentedColormap object>, xlim=None, ylim=None, verbose=False)[source]#
Plot point distributions.
- plot_sample_stats_histogram(stats_df, aba_df, sort_by_order=False, split_criterion='hemisphere', metric_name='density', value_cutoff=0.05, fold_threshold=5, fold_regions=False, save_path=None, show=True)[source]#
- plot_sub_df(sub_df, i, axes, titles, criterion_name, sort_by_order=False, struct_name_str='Structure name', struct_acronym_str='Acronym', struct_color_str='color', struct_order_str='Structure order')[source]#
- subplot_tiling(n, tiling=None)[source]#
Finds a good tiling to arrange subplots.
Arguments
- nint
Number of subplots.
- tilingNone, ‘automatic, int or tuple
The tiling to use. If None or ‘automatic’ calculate automatically. If number use this for the number of subplots along the horizontal axis. If tuple, (nx,ny) nx and ny can be numbes or None to indicate the number of sub-plots in each axis. Iif one of them is None, it will be determined automatically to fit the total number of plots.
Returns
- tilingtuple of int
The subplot tiling.