locan.visualize.render_mpl.render2d.render_2d_scatter_density#
- locan.visualize.render_mpl.render2d.render_2d_scatter_density(locdata, loc_properties=None, other_property=None, bin_range=None, ax=None, cmap='cet_fire', cbar=True, colorbar_kws=None, **kwargs)[source]#
Render localization data into a 2D image by binning x,y-coordinates into regular bins.
Prepare
matplotlib.axes.Axes
with image.Note
To rescale intensity values use norm keyword.
- Parameters:
locdata (
LocData
) – Localization data.loc_properties (
Optional
[list
[str
]]) – Localization properties to be grouped into bins. If None The coordinate_values of locdata are used.other_property (
Optional
[str
]) – Localization property (columns in locdata.data) that is averaged in each pixel. If None, localization counts are shown.bin_range (
Union
[tuple
[float
,float
],Sequence
[float
],Sequence
[Sequence
[float
]],Literal
['zero'
,'link'
],None
]) – Minimum and maximum edge for all or each dimensions with shape (2,) or (dimension, 2). If None (min, max) ranges are determined from data and returned; if ‘zero’ (0, max) ranges with max determined from data are returned. if ‘link’ (min_all, max_all) ranges with min and max determined from all combined data are returned.ax (
Optional
[Axes
]) – The axes on which to show the imagecmap (
Union
[str
,Colormaps
,Colormap
,Colormap
,Colormap
]) – The Colormap object used to map normalized data values to RGBA colors.cbar (
bool
) – If true draw a colorbar. The colobar axes is accessible using the cax property.colorbar_kws (
Optional
[dict
[str
,Any
]]) – Keyword arguments formatplotlib.pyplot.colorbar()
.kwargs (
Any
) – Other parameters passed tompl_scatter_density.ScatterDensityArtist
.
- Returns:
Axes object with the image.
- Return type:
matplotlib.axes.Axes