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
When using (graph objects)[/python/graph-objects/] rather than [Plotly Express](/python/plotly-express/), you will need to explicitly label traces and axes:
127
+
When using [graph objects](/python/graph-objects/) rather than [Plotly Express](/python/plotly-express/), you will need to explicitly label traces and axes:
Copy file name to clipboardExpand all lines: doc/python/icicle-charts.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
@@ -232,7 +232,7 @@ fig.show()
232
232
233
233
### Large Number of Slices
234
234
235
-
This example uses a [plotly grid attribute](https://plotly.com/python/reference/layout/#layout-grid) for the suplots. Reference the row and column destination using the [domain](https://plotly.com/python/reference/icicle/#icicle-domain) attribute.
235
+
This example uses a [plotly grid attribute](https://plotly.com/python/reference/layout/#layout-grid) for the subplots. Reference the row and column destination using the [domain](https://plotly.com/python/reference/icicle/#icicle-domain) attribute.
By default, the resulting HTML file is a fully self-contained HTML file which can be uploaded to a web server or shared via email or other file-sharing mechanisms. The downside to this approach is that the file is very large (5Mb+) because it contains an inlined copy of the Plotly.js library required to make the figure interactive. This can be controlled via the `include_plotlyjs` argument (see below).
57
57
58
+
### Inserting Plotly Output into HTML using a Jinja2 Template
59
+
60
+
You can insert Plotly output and text related to your data into HTML templates using Jinja2. Use `.to_html` to send the HTML to a Python string variable rather than using `write_html` to send the HTML to a disk file. Use the `full_html=False` option to output just the code necessary to add a figure to a template. We don't want to output a full HTML page, as the template will define the rest of the page's structure — for example, the page's `HTML` and `BODY` tags. First create an HTML template file containing a Jinja `{{ variable }}`. In this example, we customize the HTML in the template file by replacing the Jinja variable `{{ fig }}` with our graphic `fig`.
61
+
62
+
<!-- #region -->
63
+
64
+
```
65
+
<!DOCTYPE html>
66
+
<html>
67
+
<body>
68
+
<h1>Here's a Plotly graph!</h1>
69
+
{{ fig }}
70
+
<p>And here's some text after the graph.</p>
71
+
</body>
72
+
</html>
73
+
```
74
+
75
+
76
+
Then use the following Python to replace `{{ fig }}` in the template with HTML that will display the Plotly figure "fig":
Copy file name to clipboardExpand all lines: doc/python/mapbox-density-heatmaps.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,6 @@ jupyter:
37
37
38
38
To plot on Mapbox maps with Plotly, you may need a [Mapbox account and token](https://www.mapbox.com/studio) or a [Stadia Maps account and token](https://www.stadiamaps.com), depending on base map (`mapbox_style`) you use. On this page, we show how to use the "open-street-map" base map, which doesn't require a token, and a "stamen" base map, which requires a Stadia Maps token. See our [Mapbox Map Layers](/python/mapbox-layers/) documentation for more examples.
39
39
40
-
41
40
### OpenStreetMap base map (no token needed): density mapbox with `plotly.express`
42
41
43
42
[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on a variety of types of data](/python/px-arguments/) and produces [easy-to-style figures](/python/styling-plotly-express/).
Copy file name to clipboardExpand all lines: doc/python/mapbox-layers.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
@@ -67,7 +67,7 @@ If you basemap in `layout.mapbox.style` uses maps from the [Stadia Maps service]
67
67
The accepted values for `layout.mapbox.style` are one of:
68
68
69
69
-`"white-bg"` yields an empty white canvas which results in no external HTTP requests
70
-
-`"open-street-map"`, `"carto-positron"`, or`"carto-darkmatter"` yield maps composed of _raster_ tiles from various public tile servers which do not require signups or access tokens.
70
+
-`"open-street-map"`, `"carto-positron"`, and`"carto-darkmatter"` yield maps composed of _raster_ tiles from various public tile servers which do not require signups or access tokens.
71
71
-`"basic"`, `"streets"`, `"outdoors"`, `"light"`, `"dark"`, `"satellite"`, or `"satellite-streets"` yield maps composed of _vector_ tiles from the Mapbox service, and _do_ require a Mapbox Access Token or an on-premise Mapbox installation.
72
72
-`"stamen-terrain"`, `"stamen-toner"` or `"stamen-watercolor"` yield maps composed of _raster_ tiles from the [Stadia Maps service](https://www.stadiamaps.com), and require a Stadia Maps account and token.
73
73
- A Mapbox service style URL, which requires a Mapbox Access Token or an on-premise Mapbox installation.
Copy file name to clipboardExpand all lines: doc/python/marker-style.md
+28-3Lines changed: 28 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ jupyter:
6
6
extension: .md
7
7
format_name: markdown
8
8
format_version: '1.3'
9
-
jupytext_version: 1.14.1
9
+
jupytext_version: 1.14.6
10
10
kernelspec:
11
11
display_name: Python 3 (ipykernel)
12
12
language: python
@@ -20,7 +20,7 @@ jupyter:
20
20
name: python
21
21
nbconvert_exporter: python
22
22
pygments_lexer: ipython3
23
-
version: 3.8.0
23
+
version: 3.10.11
24
24
plotly:
25
25
description: How to style markers in Python with Plotly.
26
26
display_as: file_settings
@@ -361,7 +361,7 @@ fig.show()
361
361
362
362
### Using a Custom Marker
363
363
364
-
To use a custom marker, set the `symbol` on the `marker`. Here we set it to `diamond`.
364
+
To use a custom marker, set the `symbol` on the `marker`. Here we set it to `diamond`.
365
365
366
366
367
367
```python
@@ -378,6 +378,31 @@ fig.show()
378
378
379
379
```
380
380
381
+
#### Open Marker Colors
382
+
383
+
In the previous example, each marker has two colors, a marker color (set in Plotly Express with `color="species"`) and a line color (set on the line with `color="DarkSlateGrey"`. All open markers, like "diamond-open" in the following example, have a transparent fill, which means you can specify only one color. Specify this color using the marker color parameter. This controls the outline color and any dot or cross. For open markers, the line color does nothing.
0 commit comments