Skip to content

Commit ab658fb

Browse files
committed
docs: import urllib.request in the colorscales examples
Four examples in colorscales.md use `import urllib` and then call urllib.request.urlopen, which raises AttributeError when the example runs on its own.
1 parent c02e498 commit ab658fb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎doc/python/colorscales.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ fig.show()
443443
```python
444444
import plotly.graph_objects as go
445445

446-
import urllib
446+
import urllib.request
447447
import json
448448

449449
response = urllib.request.urlopen(
@@ -535,7 +535,7 @@ Like axes, you can customize the color bar ticks, labels, and values with `ticks
535535
```python
536536
import plotly.graph_objects as go
537537

538-
import urllib
538+
import urllib.request
539539
import json
540540

541541
# Load heatmap data
@@ -570,7 +570,7 @@ By default, color bars are displayed vertically. You can change a color bar to b
570570
```python
571571
import plotly.graph_objects as go
572572

573-
import urllib
573+
import urllib.request
574574
import json
575575

576576
# Load heatmap data
@@ -647,7 +647,7 @@ See the positioning section of [the figure data structure page](/python/figure-s
647647
```python
648648
import plotly.graph_objects as go
649649

650-
import urllib
650+
import urllib.request
651651
import json
652652

653653
# Load heatmap data

0 commit comments

Comments
 (0)