set_config¶
yohou.plotting.set_config(*, resampler=None, resampler_n_shown_samples=None, resampler_downsampler=None, resampler_gap_handler=None, resampler_trace_prefix_suffix=None, resampler_show_mean_aggregation_size=None, line_shape=None)
¶
Set global plotting configuration.
Parameters ¶
| Name | Type | Description | Default |
|---|---|---|---|
resampler
|
bool | Literal['widget'] | None
|
Controls plotly-resampler usage for time-axis plots.
|
None
|
resampler_n_shown_samples
|
int | None
|
Default number of samples shown per trace when resampling is active.
|
None
|
resampler_downsampler
|
AbstractAggregator | None
|
Default downsampling algorithm (e.g. |
None
|
resampler_gap_handler
|
AbstractGapHandler | None
|
Default gap detection strategy (e.g. |
None
|
resampler_trace_prefix_suffix
|
tuple[str, str] | None
|
Prefix and suffix added to legend names of resampled traces.
|
None
|
resampler_show_mean_aggregation_size
|
bool | None
|
Whether to show the mean aggregation bin size as a legend suffix.
|
None
|
line_shape
|
str | None
|
Line interpolation applied to every scatter line trace produced by
the yohou plotting functions. One of |
None
|
Examples ¶
>>> from yohou.plotting import set_config, get_config
>>> set_config(resampler="widget")
>>> get_config()["resampler"]
'widget'
>>> set_config(resampler=False)
>>> set_config(line_shape="hv")
>>> get_config()["line_shape"]
'hv'
>>> set_config(line_shape="linear")
See Also ¶
get_config: Read the current configuration.config_context: Temporarily override configuration.
Source Code ¶
Source code in src/yohou/plotting/_utils.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | |