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/LaTeX.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ jupyter:
35
35
36
36
#### LaTeX Typesetting
37
37
38
-
Figure titles, axis labels and annotations all accept LaTeX directives for rendering mathematical formulas and notation, when the entire label is surrounded by dollar signs `$...$`. This rendering is handled by the [MathJax library](https://www.npmjs.com/package/mathjax?activeTab=versions), which must be loaded in the environment where figures are being rendered. MathJax is included by default in Jupyter-like environments. When embedding Plotly figures in other contexts it may be required to ensure that MathJax is separately loaded, for example via a `<script>` tag pointing to a content-delivery network (CDN). Version 7 supports MathJax versions 3 and 4. Earlier versions support MathJax versions 2 and 3.
38
+
Figure titles, axis labels and annotations all accept LaTeX directives for rendering mathematical formulas and notation, when the entire label is surrounded by dollar signs `$...$`. This rendering is handled by the [MathJax library](https://www.npmjs.com/package/mathjax?activeTab=versions), which must be loaded in the environment where figures are being rendered. MathJax is included by default in Jupyter-like environments. When embedding Plotly figures in other contexts it may be required to ensure that MathJax is separately loaded, for example via a `<script>` tag pointing to a content-delivery network (CDN). Plotly.py v7 and above supports MathJax versions 3 and 4. Earlier Plotly.py versions support MathJax versions 2 and 3.
Copy file name to clipboardExpand all lines: doc/python/location-mode.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -461,7 +461,7 @@ fig = px.choropleth(
461
461
fig.show()
462
462
```
463
463
464
-
*Changed in version 7*: country names are matched by a different library, which accepts more forms and rejects some names that matched by accident before. See [Changes in Version 7](/python/v7-migration/#Country-Names) for details. To get identical results across versions, use [`locationmode='ISO-3'`](#locationmode='ISO-3') with ISO codes for `locations`.
464
+
*Changed in 7.0*: country names are matched by a different library, which accepts more forms and rejects some names that matched by accident before. See [Changes in Version 7](/python/v7-migration/#Country-Names) for details. To get identical results across versions, use [`locationmode='ISO-3'`](#locationmode='ISO-3') with ISO codes for `locations`.
Copy file name to clipboardExpand all lines: doc/python/map-configuration.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,7 +173,7 @@ fig.show()
173
173
174
174
The `layout.geo.fitbounds` attribute set to `locations` automatically sets the center and the latitude and longitude range according to the data being plotted. See the [choropleth maps](/python/choropleth-maps/) documentation for more information.
175
175
176
-
*Since version 7*,`fitbounds` defaults to `"locations"`, so a `geo` subplot fits its data without any configuration. Set `fitbounds=False` for the world view that earlier versions showed by default. Setting your own `center` or `projection.scale` also turns auto-fitting off.
176
+
*Changed in 7.0*:`fitbounds` defaults to `"locations"`, so a `geo` subplot fits its data without any configuration. Set `fitbounds=False` for the world view that earlier versions showed by default. Setting your own `center` or `projection.scale` also turns auto-fitting off.
177
177
178
178
```python
179
179
import plotly.express as px
@@ -186,7 +186,7 @@ fig.show()
186
186
187
187
### Limiting the Zoom Range
188
188
189
-
*New in version 7*
189
+
*New in 7.0*
190
190
191
191
`projection.minscale` and `projection.maxscale` clamp how far a user can zoom the map in or out. The two attributes are multipliers of `projection.scale`, so `minscale=0.5` allows zooming out to half the initial view and `maxscale=4` allows zooming in to four times it.
Copy file name to clipboardExpand all lines: doc/python/multiple-axes.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -385,7 +385,7 @@ fig.show()
385
385
386
386
Set `tickmode="sync"` on an overlaying cartesian axis to draw its ticks and gridlines at the positions of the axis it overlays, labeled from its own range. The two axes then share one grid. In this example, the `"Total bill amount"` axis syncs its ticks with the `"Total number of diners"` axis that it overlays.
387
387
388
-
*Changed in version 7*: `tickmode` defaults to `"sync"` on an overlaying axis. Earlier versions gave each axis its own independent grid. Set `tickmode="auto"` on the overlaying axis for that behavior.
388
+
*Changed in 7.0*: `tickmode` defaults to `"sync"` on an overlaying axis. Earlier versions gave each axis its own independent grid. Set `tickmode="auto"` on the overlaying axis for that behavior.
Copy file name to clipboardExpand all lines: doc/python/performance.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,7 +140,7 @@ Each `plotly` trace type is rendered with either SVG or WebGL. The following tra
140
140
WebGL is a powerful technology for accelerating rendering but comes with some strict limitations:
141
141
142
142
1. GPU requirement: WebGL is a GPU (graphics card) technology and therefore requires specific hardware which is available in most but not all cases and is supported by most but not all browsers.
143
-
2. Rasterization: WebGL-rendered data is drawn as a grid of pixels rather than as individual shapes, so can appear pixelated or fuzzy in certain cases. This also applies to static export: when a figure with WebGL traces is exported to a *vector* format such as SVG or PDF, the WebGL traces are embedded as an encapsulated raster (a bitmap) rather than as true vectors, so those parts will appear pixelated on zoom. To force fully-vector output, use `render_mode="svg"` (see [WebGL with Plotly Express](#webgl-with-plotly-express) below). In addition, text rendering will differ between SVG and WebGL-powered traces.
143
+
2. Rasterization: WebGL-rendered data is drawn as a grid of pixels rather than as individual shapes, so can appear pixelated or fuzzy in certain cases. This also applies to static export: when a figure with WebGL traces is exported to a *vector* format such as SVG or PDF, the WebGL traces are embedded as an encapsulated raster (a bitmap) rather than as true vectors, so those parts will appear pixelated on zoom. To force fully-vector output, use `render_mode="svg"`to supported Plotly Express functions (see [WebGL with Plotly Express](#webgl-with-plotly-express) below). In addition, text rendering will differ between SVG and WebGL-powered traces.
144
144
3. Context limits: browsers impose a strict limit on the number of WebGL "contexts" that any given web document can access. WebGL-powered traces in `plotly` can use multiple contexts in some cases but as a general rule, **it may not be possible to render more than 8 WebGL-involving figures on the same page at the same time.** See the following section, Multiple WebGL Contexts, for more details.
145
145
4. Size limits: browsers impose hardware-dependent limits on the height and width of figures using WebGL which users may encounter with extremely large plots (e.g. tens of thousands of pixels of height).
Copy file name to clipboardExpand all lines: doc/python/quiver-plots.md
+40-5Lines changed: 40 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ jupyter:
33
33
thumbnail: thumbnail/quiver-plot.jpg
34
34
---
35
35
36
-
A quiver plot displays a 2D vector field as an array of arrows. Since version 7, Plotly has a `Quiver` trace type, which is the recommended way to make quiver plots. Earlier versions relied on the `create_quiver`[figure factory](/python/figure-factories/), which is still available and is described at the end of this page.
36
+
A quiver plot displays a 2D vector field as an array of arrows. Since version 7.0, Plotly has a `Quiver` trace type, which is the recommended way to make quiver plots. Earlier versions relied on the `create_quiver`[figure factory](/python/figure-factories/), which is still available and is described at the end of this page.
37
37
38
38
A `Quiver` trace takes four arrays of the same length: `x` and `y` give the position of each arrow, and `u` and `v` give the vector components at that position. Arrow direction and length come from `(u, v)`.
39
39
@@ -57,7 +57,7 @@ fig.show()
57
57
58
58
`anchor` sets which part of the arrow sits at its `(x, y)` position: `"tail"` (the default), `"tip"`, or `"center"`.
59
59
60
-
Arrow length is controlled by `sizemode` and `sizeref`. With `sizemode="scaled"` (the default), lengths are normalized against the longest vector in the field and the density of points, so a dense grid stays readable whatever the underlying values are. `sizemode="raw"` draws each arrow at its own magnitude instead. `sizeref` is a multiplier applied on top: values below 1 shorten every arrow, above 1 lengthen them.
60
+
Arrow length is controlled by `lengthmode` and `lengthfactor`. With `lengthmode="scaled"` (the default), lengths are normalized against the longest vector in the field and the density of points, so a dense grid stays readable whatever the underlying values are. `lengthmode="raw"` draws each arrow at its specified magnitude determined by `u` and `v`. `lengthfactor` is a multiplier applied on top: values below 1 shorten every arrow, above 1 lengthen them.
61
61
62
62
```python
63
63
import plotly.graph_objects as go
@@ -68,13 +68,48 @@ u, v = -y, x # rotational field
fig.update_layout(title_text="Rotational field, arrows centered on each point",
74
74
yaxis_scaleanchor="x")
75
75
fig.show()
76
76
```
77
77
78
+
#### Setting Arrow Reference
79
+
80
+
The `arrowref` property controls how the `u` and `v` vector components are interpreted, and how the vector arrows respond to zooming along a single axis.
81
+
82
+
By default, `arrowref="data"`, meaning that `u` and `v` are interpreted as data values. This means that the angle of the vectors depends on the relative scale of the two axes, and the apparent angle will change when zooming along one axis. This is the appropriate behavior when `u` and `v` represent data-space values, such as when illustrating a magnetic field.
83
+
84
+
To instead interpret `u` and `v` in pixel values, set `arrowref="paper"`, which will always draw vectors at the same angle regardless of the axis scales. This is the correct behavior when the vectors correspond to abstract values which are not linked to the data space.
85
+
86
+
Note that `arrowref="paper"` always scales arrow lengths, so `lengthmode="raw"` is ignored when you set it.
87
+
88
+
The difference is clearest on axes with different scales. Both panels below plot the same vectors, `u=1` and `v=0.1`, on a grid where x spans 10 units and y spans 1.
With `"data"`, `v=0.1` covers a tenth of the y-axis while `u=1` covers a tenth of the x-axis, so the arrows tilt noticeably. With `"paper"`, the same components are 1 pixel across and 0.1 pixels up, so the arrows stay nearly flat whatever the axis ranges are.
112
+
78
113
#### Coloring Arrows by a Scalar Field
79
114
80
115
Pass `marker.color` an array with one value per arrow, together with the usual colorscale attributes, to color each arrow by that value. If you enable a colorscale without supplying a `marker.color` array, arrows are colored by their vector magnitude. A single (non-array) `marker.color` paints the whole field one color.
`create_quiver` builds a quiver plot out of `Scatter` traces rather than using the `Quiver` trace type. It remains available, and offers two options the trace type does not: `angle` sets the arrowhead angle in radians, and `scaleratio` fixes the ratio between the y-axis and x-axis scales.
160
195
@@ -171,7 +206,7 @@ fig = ff.create_quiver(x, y, u, v)
171
206
fig.show()
172
207
```
173
208
174
-
Because the result is made of `Scatter` traces, the arrows cannot be colored individually by a scalar field, and the trace-level attributes described above (`anchor`, `sizemode`, `marker.arrowsize`) do not apply.
209
+
Because the result is made of `Scatter` traces, the arrows cannot be colored individually by a scalar field, and the trace-level attributes described above (`anchor`, `lengthmode`, `marker.arrowsize`) do not apply.
Copy file name to clipboardExpand all lines: doc/python/splom.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -338,7 +338,7 @@ fig.show()
338
338
339
339
#### Linked Axes
340
340
341
-
*Changed in version 7*
341
+
*Changed in 7.0*
342
342
343
343
`dimensions[].axis.matches` links the x-axis and the y-axis generated by a dimension, so every subplot in the same row and column pans and zooms together. It now defaults to `True`. Plotly Express already set it on the figures it generated, so `px.scatter_matrix` is unaffected. Set it to `False` on a dimension to zoom that dimension's row and column independently.
Copy file name to clipboardExpand all lines: doc/python/static-image-generation-migration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ jupyter:
38
38
39
39
Plotly.py 6.1 introduces support for Kaleido v1, which [improves static image generation](https://plotly.com/blog/kaleido-the-next-generation/) for Plotly figures.
40
40
41
-
Plotly.py 6.1 deprecated support for earlier versions of Kaleido and support for [Orca](/python/orca-management/).**Version 7.0 removed both.** If you still use Orca or Kaleido v0, update to the latest Kaleido. This page documents how to migrate your Plotly code to Kaleido v1 and outlines the changes in functionality.
41
+
Plotly.py 7.0 removed support for earlier versions of Kaleido and support for [Orca](/python/orca-management/). If you still use Orca or Kaleido v0, update to the latest Kaleido. This page documents how to migrate your Plotly code to Kaleido v1 and outlines the changes in functionality.
42
42
43
43
To migrate from either Orca or Kaleido v0, first install the latest Kaleido with:
0 commit comments