File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed
Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change 1717 "source" : [
1818 " import numpy as np\n " ,
1919 " import pandas as pd\n " ,
20- " import plotly.io as pio\n " ,
2120 " import xarray as xr\n " ,
2221 " \n " ,
23- " from xarray_plotly import xpx\n " ,
22+ " from xarray_plotly import config, xpx\n " ,
2423 " \n " ,
25- " pio.renderers.default = \" notebook\" "
24+ " config.notebook() # Configure Plotly for notebook rendering "
2625 ]
2726 },
2827 {
6463 " fig"
6564 ]
6665 },
66+ {
67+ "cell_type" : " markdown" ,
68+ "metadata" : {},
69+ "source" : [
70+ " ### Configuring Label Behavior\n " ,
71+ " \n " ,
72+ " Use `config.set_options()` to control how labels are extracted from attributes:"
73+ ]
74+ },
75+ {
76+ "cell_type" : " code" ,
77+ "execution_count" : null ,
78+ "metadata" : {},
79+ "outputs" : [],
80+ "source" : [
81+ " # Disable units in labels\n " ,
82+ " with config.set_options(label_include_units=False):\n " ,
83+ " fig = xpx(da).line(title=\" Without Units in Labels\" )\n " ,
84+ " fig"
85+ ]
86+ },
6787 {
6888 "cell_type" : " markdown" ,
6989 "metadata" : {},
You can’t perform that action at this time.
0 commit comments