You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/python/configuration-options.md
+62-41
Original file line number
Diff line number
Diff line change
@@ -63,18 +63,20 @@ fig.add_trace(
63
63
fig.show(config=config)
64
64
```
65
65
66
-
### Forcing The Modebar to Always Be Visible
66
+
### Turning Off Responsiveness
67
67
68
-
When users hover over a figure generated with plotly.py, a modebar appears in the top-right of the figure. This presents users with several options for interacting with the figure.
68
+
By default, figures you create with the `plotly.py` package are [responsive](https://en.wikipedia.org/wiki/Responsive_web_design). Responsive figures automatically change their height and width when the size of the window they are displayed in changes. This is true for figures which are displayed in web browsers on desktops and mobile, Jupyter Notebooks, and other [rendering](https://plot.ly/python/renderers/) environments.
69
69
70
-
By default, the modebar is only visible while the user is hovering over the chart. If you would like the modebar to always be visible regardless of whether or not the user is currently hovering over the figure, set the displayModeBar attribute in the configuration of your figure to true.
70
+
Try resizing your browser window to see this behavior in effect on this page.
71
+
72
+
If you would like to disable this default behavior and force your figures to always have the same height and width regardless of the window size, set the value of the `responsive` key to `False` in your figure's configuration dictionary.
71
73
72
74
```python
73
75
import plotly.graph_objects as go
74
76
75
77
fig = go.Figure()
76
78
77
-
config = {'displayModeBar': True}
79
+
config = {'responsive': False}
78
80
79
81
fig.add_trace(
80
82
go.Scatter(
@@ -84,18 +86,14 @@ fig.add_trace(
84
86
fig.show(config=config)
85
87
```
86
88
87
-
### Preventing the Modebar from Appearing
88
-
89
-
When users hover over a figure generated with `plotly.py`, a modebar appears in the top-right of the figure. This presents users with several options for interacting with the figure.
90
-
91
-
By default, the modebar is only visible while the user is hovering over the chart. If you would like the modebar to never be visible, then set the `displayModeBar` attribute in the config of your figure to false.
89
+
### Making A Static Chart
92
90
93
91
```python
94
92
import plotly.graph_objects as go
95
93
96
94
fig = go.Figure()
97
95
98
-
config = {'displayModeBar': False}
96
+
config = {'staticPlot': True}
99
97
100
98
fig.add_trace(
101
99
go.Scatter(
@@ -105,15 +103,18 @@ fig.add_trace(
105
103
fig.show(config=config)
106
104
```
107
105
106
+
### Forcing The Modebar to Always Be Visible
108
107
109
-
### Hiding the Plotly Logo on the Modebar
108
+
When users hover over a figure generated with plotly.py, a **modebar** appears in the top-right of the figure. This presents users with several options for interacting with the figure.
109
+
110
+
By default, the modebar is only visible while the user is hovering over the chart. If you would like the modebar to always be visible regardless of whether or not the user is currently hovering over the figure, set the displayModeBar attribute in the configuration of your figure to true.
110
111
111
112
```python
112
113
import plotly.graph_objects as go
113
114
114
115
fig = go.Figure()
115
116
116
-
config = {'displaylogo': False}
117
+
config = {'displayModeBar': True}
117
118
118
119
fig.add_trace(
119
120
go.Scatter(
@@ -123,20 +124,18 @@ fig.add_trace(
123
124
fig.show(config=config)
124
125
```
125
126
126
-
### Turning Off Responsiveness
127
-
128
-
By default, figures you create with the `plotly.py` package are [responsive](https://en.wikipedia.org/wiki/Responsive_web_design). Responsive figures automatically change their height and width when the size of the window they are displayed in changes. This is true for figures which are displayed in web browsers on desktops and mobile, Jupyter Notebooks, and other [rendering](https://plot.ly/python/renderers/) environments.
127
+
### Preventing the Modebar from Appearing
129
128
130
-
Try resizing your browser window to see this behavior in effect on this page.
129
+
When users hover over a figure generated with `plotly.py`, a modebar appears in the top-right of the figure. This presents users with several options for interacting with the figure.
131
130
132
-
If you would like to disable this default behavior and force your figures to always have the same height and width regardless of the window size, set the value of the `responsive` key to `False` in your figure's configuration dictionary.
131
+
By default, the modebar is only visible while the user is hovering over the chart. If you would like the modebar to never be visible, then set the `displayModeBar` attribute in the config of your figure to false.
133
132
134
133
```python
135
134
import plotly.graph_objects as go
136
135
137
136
fig = go.Figure()
138
137
139
-
config = {'responsive': False}
138
+
config = {'displayModeBar': False}
140
139
141
140
fig.add_trace(
142
141
go.Scatter(
@@ -146,14 +145,15 @@ fig.add_trace(
146
145
fig.show(config=config)
147
146
```
148
147
149
-
### Making A Static Chart
148
+
149
+
### Hiding the Plotly Logo on the Modebar
150
150
151
151
```python
152
152
import plotly.graph_objects as go
153
153
154
154
fig = go.Figure()
155
155
156
-
config = {'staticPlot': True}
156
+
config = {'displaylogo': False}
157
157
158
158
fig.add_trace(
159
159
go.Scatter(
@@ -163,7 +163,7 @@ fig.add_trace(
163
163
fig.show(config=config)
164
164
```
165
165
166
-
### Customizing Download Plot Button Options
166
+
### Customizing Modebar "Download Plot" Button
167
167
168
168
The camera icon on the modebar causes a static version of the figure to be downloaded via the user's browser. The default behaviour is to download a PNG of size 700 by 450 pixels.
The dictionary that you use to specify configuration options for your figures can contain more than one configuration key/value pair.
207
+
To delete buttons from the modebar, pass an array of strings containing the names of the buttons you want to remove to the `modeBarButtonsToRemove` attribute in the figure's configuration dictionary. Note that different chart types have different default modebars. The following is a list of all the modebar buttons and the chart types they are associated with:
To delete buttons from the modebar, pass an array of strings containing the names of the buttons you want to remove to the `modeBarButtonsToRemove` attribute in the figure's configuration dictionary. Note that different chart types have different default modebars. The following is a list of all the modebar buttons and the chart types they are associated with:
Some modebar buttons of Cartesian plots are optional and have to be added explicitly, using the `modeBarButtonsToAdd` config attribute. These buttons are used for drawing or erasing shapes. See [the tutorial on shapes and shape drawing](python/shapes#drawing-shapes-on-cartesian-plots) for more details.
title_text='Draw a path to separate versicolor and virginica',
287
+
modebar_add=['drawline',
288
+
'drawopenpath',
289
+
'drawclosedpath',
290
+
'drawcircle',
291
+
'drawrect',
292
+
'eraseshape'
293
+
]
294
+
)
295
+
```
296
+
276
297
### Double-Click Delay
277
298
Sets the maximum delay between two consecutive clicks to be interpreted as a double-click in milliseconds. This is the time interval between first mousedown and second mouseup. The default timing is 300 ms (less than half a second).
278
299
This setting propagates to all on-subplot double clicks (except for `geo` and `mapbox`).
Copy file name to clipboardExpand all lines: doc/python/hover-text-and-formatting.md
+2
Original file line number
Diff line number
Diff line change
@@ -250,6 +250,8 @@ fig.show()
250
250
251
251
### Hover Templates with Mixtures of Period data
252
252
253
+
*New in v5.0*
254
+
253
255
When [displaying periodic data](https://plotly.com/python/time-series/#displaying-period-data) with mixed-sized periods (i.e. quarterly and monthly) in conjunction with `x` or `x unified` hovermodes and using `hovertemplate`, the `xhoverformat` attribute can be used to control how each period's X value is displayed, and the special `%{xother}` hover-template directive can be used to control how the X value is displayed for points that do not share the exact X coordinate with the point that is being hovered on. `%{xother}` will return an empty string when the X value is the one being hovered on, otherwise it will return `(%{x})`. The special `%{_xother}`, `%{xother_}` and `%{_xother_}` variations will display with spaces before, after or around the parentheses, respectively.
Copy file name to clipboardExpand all lines: doc/python/icicle-charts.md
+6-4
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,8 @@ jupyter:
33
33
thumbnail: thumbnail/icicle.png
34
34
---
35
35
36
+
*New in v5.0*
37
+
36
38
Icicle charts visualize hierarchical data using rectangular sectors that cascade from root to leaves in one of four directions: up, down, left, or right. Similar to [Sunburst charts](https://plotly.com/python/sunburst-charts/) and [Treemaps](https://plotly.com/python/treemaps/) charts, the hierarchy is defined by `labels` (`names` for `px.icicle`) and `parents` attributes. Click on one sector to zoom in/out, which also displays a pathbar on the top of your icicle. To zoom out, you can click the parent sector or click the pathbar as well.
37
39
38
40
### Basic Icicle Plot with plotly.express
@@ -96,7 +98,7 @@ When the argument of color corresponds to non-numerical data, discrete colors ar
Copy file name to clipboardExpand all lines: doc/python/pattern-hatching-texture.md
+2
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,8 @@ jupyter:
34
34
thumbnail: thumbnail/pattern.png
35
35
---
36
36
37
+
*New in v5.0*
38
+
37
39
[Bar charts](/python/bar-charts/), [histograms](/python/histograms/) and [polar bar charts](/python/wind-rose-charts/) have large markers which support not only a fill color, but also an optional **pattern** (also known as "hatching" or "texture"). This can be used for a variety of reasons:
38
40
39
41
* to double-encode variables (i.e. using both color and pattern) to improve accessibility for visually-impaired end-users
Copy file name to clipboardExpand all lines: doc/python/renderers.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -253,7 +253,9 @@ It is important to note that `FigureWidget` does not use the renderers framework
253
253
254
254
## Performance
255
255
256
-
No matter the approach chosen to display a figure, [the figure data structure](https://plotly.com/python/figure-structure/) is first (automatically, internally) serialized into a JSON string before being transferred from the Python context to the browser (or [to an HTML file first](https://plotly.com/python/interactive-html-export/) or [to Kaleido for static image export](https://plotly.com/python/static-image-export/)).
256
+
No matter the approach chosen to display a figure, [the figure data structure](https://plotly.com/python/figure-structure/) is first (automatically, internally) serialized into a JSON string before being transferred from the Python context to the browser (or [to an HTML file first](https://plotly.com/python/interactive-html-export/) or [to Kaleido for static image export](https://plotly.com/python/static-image-export/)).
257
+
258
+
*New in v5.0*
257
259
258
260
The default JSON serialization mechanism can be slow for figures with many data points or with large `numpy` arrays or data frames. **If [the `orjson` package](https://github.com/ijl/orjson) is installed**, `plotly` will use that instead of the built-in `json` package, which can lead to **5-10x** speedups for large figures.
Copy file name to clipboardExpand all lines: doc/python/time-series.md
+2
Original file line number
Diff line number
Diff line change
@@ -205,6 +205,8 @@ fig.show()
205
205
206
206
### Hover Templates with Mixtures of Period data
207
207
208
+
*New in v5.0*
209
+
208
210
When displaying periodic data with mixed-sized periods (i.e. quarterly and monthly) in conjunction with [`x` or `x unified` hovermodes and using `hovertemplate`](https://plotly.com/python/hover-text-and-formatting/), the `xhoverformat` attribute can be used to control how each period's X value is displayed, and the special `%{xother}` hover-template directive can be used to control how the X value is displayed for points that do not share the exact X coordinate with the point that is being hovered on. `%{xother}` will return an empty string when the X value is the one being hovered on, otherwise it will return `(%{x})`. The special `%{_xother}`, `%{xother_}` and `%{_xother_}` variations will display with spaces before, after or around the parentheses, respectively.
0 commit comments