Title: ScatterMapbox subplots not working · Issue #1728 · plotly/plotly.py · GitHub
Open Graph Title: ScatterMapbox subplots not working · Issue #1728 · plotly/plotly.py
X Title: ScatterMapbox subplots not working · Issue #1728 · plotly/plotly.py
Description: Hi, First of all thank you for making plotly. It's amazing. I've been trying to make a subplot of ScatterMapbox (e.g.: Two maps, one below the other) without success. I'm trying this in a jupyter notebook: linux debian buster Firefox 68....
Open Graph Description: Hi, First of all thank you for making plotly. It's amazing. I've been trying to make a subplot of ScatterMapbox (e.g.: Two maps, one below the other) without success. I'm trying this in a jupyter n...
X Description: Hi, First of all thank you for making plotly. It's amazing. I've been trying to make a subplot of ScatterMapbox (e.g.: Two maps, one below the other) without success. I'm trying this in...
Opengraph URL: https://github.com/plotly/plotly.py/issues/1728
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ScatterMapbox subplots not working","articleBody":"Hi,\r\nFirst of all thank you for making plotly. It's amazing.\r\nI've been trying to make a subplot of ScatterMapbox (e.g.: Two maps, one below the other) without success. I'm trying this in a jupyter notebook:\r\n- linux debian buster\r\n- Firefox 68.0.1\r\n- python 3.6.9\r\n- jupyter 1.0.0\r\n- plotly 4.1.0\r\n\r\nThe code I use is:\r\n```python\r\nfig = make_subplots(\r\n rows=2, cols=1,\r\n specs=[[{'type': 'mapbox'}],[{'type': 'mapbox'}]],\r\n subplot_titles=('Montreal 1','Montreal 2'),\r\n)\r\n\r\nfig.add_trace(go.Scattermapbox(\r\n lat=['45.5017'],\r\n lon=['-73.5673'],\r\n mode='markers',\r\n marker=go.scattermapbox.Marker(\r\n size=14\r\n ),\r\n text=['Montreal'],\r\n ), row=1, col=1\r\n)\r\n\r\n\r\nfig.add_trace(go.Scattermapbox(\r\n lat=['45.6017'],\r\n lon=['-73.7673'],\r\n mode='markers',\r\n marker=go.scattermapbox.Marker(\r\n size=14\r\n ),\r\n text=['Montreal 2'],\r\n ), row=2, col=1\r\n )\r\n\r\nfig.update_layout(\r\n hovermode='closest',\r\n mapbox=go.layout.Mapbox(\r\n accesstoken=mapbox_access_token,\r\n bearing=0,\r\n center=go.layout.mapbox.Center(\r\n lat=45,\r\n lon=-73\r\n ),\r\n pitch=0,\r\n zoom=5\r\n )\r\n)\r\n\r\nfig.show()\r\n```\r\nThis results in an empty map:\r\n\r\nIn my browser console I have:\r\n```\r\nError: No valid mapbox style found, please set `mapbox.style` to one of:\r\nopen-street-map, white-bg, carto-positron, carto-darkmatter, stamen-terrain, stamen-toner, stamen-watercolor\r\nor register a Mapbox access token to use a Mapbox-served style.\r\n```\r\nPassing a `mapbox_style` to the layout does not seem to solve the issue.\r\n\r\nNote that running the simple montreal example from the doc works properly, even adding a single map to the subplot works too:\r\n```python\r\nfig = make_subplots(\r\n rows=2, cols=1,\r\n specs=[[{\"type\": \"mapbox\"}],[{\"type\": \"mapbox\"}]],\r\n subplot_titles=(\"Montreal 1\",\"Montreal 2\"),\r\n)\r\n\r\nfig.add_trace(go.Scattermapbox(\r\n lat=['45.5017'],\r\n lon=['-73.5673'],\r\n mode='markers',\r\n marker=go.scattermapbox.Marker(\r\n size=14\r\n ),\r\n text=['Montreal'],\r\n ), row=1, col=1\r\n)\r\n\r\nfig.update_layout(\r\n hovermode='closest',\r\n mapbox=go.layout.Mapbox(\r\n accesstoken=mapbox_access_token,\r\n bearing=0,\r\n center=go.layout.mapbox.Center(\r\n lat=45,\r\n lon=-73\r\n ),\r\n pitch=0,\r\n zoom=5\r\n )\r\n)\r\n\r\nfig.show()\r\n```\r\nI've tried passing multiple `Scattermapbox` to a figure's data but this results in two mapbox layers in the same map. At this point I'm starting to think that subplots are not supported with scattermapbox but as could not find anything regarding this in the docs, I'm probably missing something.\r\n","author":{"url":"https://github.com/Timost","@type":"Person","name":"Timost"},"datePublished":"2019-08-19T18:13:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/1728/plotly.py/issues/1728"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:51fe102a-fa25-932d-4b43-28088c15f1e8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B664:3E5B83:110D882:189A301:6A58A604 |
| html-safe-nonce | eb98d3445387d2e6456659d72bf4674ad66610a49bdbe5f348c2af09089f9b5e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjY0OjNFNUI4MzoxMTBEODgyOjE4OUEzMDE6NkE1OEE2MDQiLCJ2aXNpdG9yX2lkIjoiMjExNzM2MjU0NDc5OTAyMjEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bb82c97172e3cc6ae0d80c0af4f637946ee9f236bd5a0bdcb39aa3363810093c |
| hovercard-subject-tag | issue:482454733 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.py/1728/issue_layout |
| twitter:image | https://opengraph.githubassets.com/33e24d53536f17e3a42f6b47cff904b24796e524bb0fed8c46f7b7ba216491a6/plotly/plotly.py/issues/1728 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/33e24d53536f17e3a42f6b47cff904b24796e524bb0fed8c46f7b7ba216491a6/plotly/plotly.py/issues/1728 |
| og:image:alt | Hi, First of all thank you for making plotly. It's amazing. I've been trying to make a subplot of ScatterMapbox (e.g.: Two maps, one below the other) without success. I'm trying this in a jupyter n... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Timost |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.py git https://github.com/plotly/plotly.py.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 14579099 |
| octolytics-dimension-repository_nwo | plotly/plotly.py |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14579099 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.py |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width