upxo.viz.gbviz module
gbviz.py
Grain-boundary segment visualization for UPXO: plotting labeled grain-boundary segment images, isolating a single segment by ID, and overlaying junction-point markers styled by junction order.
- upxo.viz.gbviz.see_all_gbsegs(gbsegImage, figsize=(5, 5), dpi=75, cmap='nipy_spectral', title='GB segments', xlabel='X-axis, um', ylabel='Y-axis, um', cbarLabel='Segment ID (float)')[source]
Visualize the GB segments in the given image.
- Parameters:
gbsegImage (2D array-like) – The image containing the GB segments, where each segment is represented by a unique ID (float).
figsize (tuple of float, optional) – Matplotlib figure size in inches. Default (5, 5).
dpi (int, optional) – Figure resolution. Default 75.
cmap (str, optional) – Matplotlib colormap name for the segment-ID image. Default ‘nipy_spectral’.
title (str, optional) – Plot title. Default “GB segments”.
xlabel (str, optional) – X-axis label. Default “X-axis, um”.
ylabel (str, optional) – Y-axis label. Default “Y-axis, um”.
cbarLabel (str, optional) – Colorbar label. Default “Segment ID (float)”.
Usage
-----
gbViz (import upxo.viz.gbviz as)
as (Use)
- upxo.viz.gbviz.see_gbsegs_fid(gbsegImage, fid, figsize=(5, 5), dpi=75, cmap='nipy_spectral', title='GB segments', xlabel='X-axis, um', ylabel='Y-axis, um', cbarLabel='Segment ID (float)')[source]
import upxo.viz.gbviz as gbViz Use as: gbViz.see_gbsegs_fid
- upxo.viz.gbviz.see_gbsegs_jp_by_jpo(gbsegs, jps_by_order, style_by_order=None, default_style=None, figsize=(5, 5), dpi=80, legend_anchor=(1.02, 1.0), ms2=4, ms3=4, ms4=4, ms5=4, legend_loc='upper left', legend_title='Junction point data', legend_frameon=True, hide_axis=True, cmap='rainbow')[source]
Import import upxo.viz.gbviz as gbViz Use as: gbViz.plot_gbsegs_by_order