Skip to content

Commit 3293f4d

Browse files
authored
Merge pull request #5466 from plotly/merge-doc-prod-to-main
Merge doc prod to main
2 parents dad2520 + 61c9f6f commit 3293f4d

File tree

5 files changed

+496
-36
lines changed

5 files changed

+496
-36
lines changed

doc/python/animations.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -339,27 +339,6 @@ sliders_dict = {
339339
"steps": []
340340
}
341341

342-
# make data
343-
year = 1952
344-
for continent in continents:
345-
dataset_by_year = dataset[dataset["year"] == year]
346-
dataset_by_year_and_cont = dataset_by_year[
347-
dataset_by_year["continent"] == continent]
348-
349-
data_dict = {
350-
"x": list(dataset_by_year_and_cont["lifeExp"]),
351-
"y": list(dataset_by_year_and_cont["gdpPercap"]),
352-
"mode": "markers",
353-
"text": list(dataset_by_year_and_cont["country"]),
354-
"marker": {
355-
"sizemode": "area",
356-
"sizeref": 200000,
357-
"size": list(dataset_by_year_and_cont["pop"])
358-
},
359-
"name": continent
360-
}
361-
fig_dict["data"].append(data_dict)
362-
363342
# make frames
364343
for year in years:
365344
frame = {"data": [], "name": str(year)}
@@ -396,6 +375,9 @@ for year in years:
396375

397376
fig_dict["layout"]["sliders"] = [sliders_dict]
398377

378+
# make data
379+
fig_dict["data"] = fig_dict["frames"][0]['data']
380+
399381
fig = go.Figure(fig_dict)
400382

401383
fig.show()

doc/python/choropleth-maps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ In **Plotly.py 6.3 and later**, the built-in countries geometry is created from
216216

217217
In **earlier versions of Plotly.py**, the built-in countries geometry is based on Natural Earth data only. Plotly includes data from Natural Earth "as-is". This dataset draws boundaries of countries according to de facto status. See the [Natural Earth page for more details](https://www.naturalearthdata.com/downloads/50m-cultural-vectors/50m-admin-0-countries-2/).
218218

219-
To use the built-in countries geometry, provide `locations` as [three-letter ISO country codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3).
219+
To use the built-in countries geometry, provide `locations` as [three-letter ISO country codes](/python/outline-map-locations/#supported-iso-codes).
220220

221221
```python
222222
import plotly.express as px
@@ -229,7 +229,7 @@ fig = px.choropleth(df, locations="iso_alpha",
229229
fig.show()
230230
```
231231

232-
To use the USA States geometry, set `locationmode='USA-states'` and provide `locations` as two-letter state abbreviations:
232+
To use the USA States geometry, set `locationmode='USA-states'` and provide `locations` as [two-letter state abbreviations](/python/outline-map-locations/#supported-us-state-codes):
233233

234234
```python
235235
import plotly.express as px

doc/python/dendrogram.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fig.show()
7979

8080
#### Plot a Dendrogram with a Heatmap
8181

82-
See also the [Dash Bio demo](https://dash-bio.plotly.host/dash-clustergram/).
82+
This example uses randomly generated sample data to demonstrate how to plot a dendrogram with a heatmap.
8383

8484
```python
8585
import plotly.graph_objects as go
@@ -89,12 +89,11 @@ import numpy as np
8989
from scipy.spatial.distance import pdist, squareform
9090

9191

92-
# get data
93-
data = np.genfromtxt("http://files.figshare.com/2133304/ExpRawData_E_TABM_84_A_AFFY_44.tab",
94-
names=True,usecols=tuple(range(1,30)),dtype=float, delimiter="\t")
95-
data_array = data.view((float, len(data.dtype.names)))
96-
data_array = data_array.transpose()
97-
labels = data.dtype.names
92+
# Generate sample data
93+
np.random.seed(1)
94+
X = np.random.rand(15, 15)
95+
labels = [f'Sample_{i}' for i in range(15)]
96+
data_array = X
9897

9998
# Initialize figure by creating upper dendrogram
10099
fig = ff.create_dendrogram(data_array, orientation='bottom', labels=labels)

0 commit comments

Comments
 (0)