myco.vis¶
Visualization tools for ndarray data and tensorflow modeling.
get_styles()
¶
Lists the available plotting styles.
Returns:
Type | Description |
---|---|
list
|
list of style names to pass to |
Source code in myco/vis.py
29 30 31 32 33 34 35 36 37 38 39 |
|
plot_3d_array(array, vmin=None, vmax=None, labels=None, title=None, colorbar=True, cmap=DEFAULT_CMAP, style=DEFAULT_STYLE, **kwargs)
¶
Creates a square set of subplots for a 3d numpy array.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
array |
np.ndarray
|
a [height, width, nbands] numpy array. Will become |
required |
vmin |
_number
|
set the lower range of the colorbar to this value. |
None
|
vmax |
_number
|
set the upper range of the colorbar to this value. |
None
|
labels |
list
|
|
None
|
title |
str
|
the full figure title. |
None
|
colorbar |
bool
|
add a labeled colorbar to each subplot. |
True
|
cmap |
mpl.colors.LinearSegmentedColormap
|
the colormap to apply to each band. |
DEFAULT_CMAP
|
style |
str
|
the matplotlib plot style to apply. |
DEFAULT_STYLE
|
**kwargs |
keyword arguments to pass to |
{}
|
Returns:
Type | Description |
---|---|
tuple
|
(fig, axs) matplotlib subplot figure and axes. run |
Source code in myco/vis.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
set_style(style)
¶
Sets a series of plot style parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
style |
str
|
str of the style name to use. from |
required |
Returns:
Type | Description |
---|---|
None
|
None. Updates matplotlib.rcParams |
Source code in myco/vis.py
17 18 19 20 21 22 23 24 25 26 |
|