plotstate
PlotState class, used for plot settings.
palettes = {k.replace('256', '').lower(): kfor k in colormaps if '256' in k}
module-attribute
#
dict: all valid colorscales/palettes for plotting with. Created from colorcet's named palettes and Bokeh's continuous 256 color palettes
PlotState
#
Combination of reactive states which instantiate a specific plot's settings/properties.
Initializes based on keyword arguments, which are passed via plot creation methods in the ViewCard/GridLayout.
Attributes:
Name | Type | Description |
---|---|---|
plottype |
str
|
the plottype; non-reactive and unchanging |
subset |
str
|
subset key |
columns |
list(str
|
a list of columns selected. Used in Table views. |
x |
str
|
x column |
y |
str
|
y column |
color |
str
|
color data column |
colorscale |
str
|
colormap |
nbins |
int
|
number of bins for aggregations |
bintype |
str
|
type of aggregation to perform |
logcolor |
bool
|
whether the color data is log-scaled |
logx |
bool
|
whether the x data is log-scaled |
logy |
bool
|
whether the y data is log-scaled |
flipx |
bool
|
whether the x dimension is flipped |
flipy |
bool
|
whether the y dimension is flipped |
xmapping |
dict
|
categorical datamapping for x data |
ymapping |
dict
|
categorical datamapping for y data |
colormapping |
dict
|
categorical datamapping for color data |
Lookup |
dict
|
data for quick lookup |
Source code in src/sdss_explorer/dashboard/dataclass/plotstate.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 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 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
reset_values()
#
Conditional reset based on if given column/subset is still in list. Triggered by threads in plot_settings.
Source code in src/sdss_explorer/dashboard/dataclass/plotstate.py
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 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
swap_axes()
#
Swaps current x and y axes.
Source code in src/sdss_explorer/dashboard/dataclass/plotstate.py
103 104 105 106 107 108 109 |
|
update_subset(name, b=False)
#
Callback to update subset by name.
Source code in src/sdss_explorer/dashboard/dataclass/plotstate.py
162 163 164 165 166 167 168 169 170 171 172 |
|