Title: `fitbounds="locations"` parameter not working for `px.choropleth_map` · Issue #4262 · plotly/plotly.py · GitHub
Open Graph Title: `fitbounds="locations"` parameter not working for `px.choropleth_map` · Issue #4262 · plotly/plotly.py
X Title: `fitbounds="locations"` parameter not working for `px.choropleth_map` · Issue #4262 · plotly/plotly.py
Description: The fitbounds parameter appear not to work when used in choropleth mapbox. The only way I found to pass it to the Figure object was to use the update_geos method. The following is a sample of the code to show the parameter used: fig = px...
Open Graph Description: The fitbounds parameter appear not to work when used in choropleth mapbox. The only way I found to pass it to the Figure object was to use the update_geos method. The following is a sample of the c...
X Description: The fitbounds parameter appear not to work when used in choropleth mapbox. The only way I found to pass it to the Figure object was to use the update_geos method. The following is a sample of the c...
Opengraph URL: https://github.com/plotly/plotly.py/issues/4262
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`fitbounds=\"locations\"` parameter not working for `px.choropleth_map`","articleBody":"The `fitbounds` parameter appear not to work when used in choropleth mapbox. The only way I found to pass it to the Figure object was to use the `update_geos` method.\r\n\r\nThe following is a sample of the code to show the parameter used:\r\n```\r\nfig = px.choropleth_mapbox(\r\n df, \r\n geojson=self.geojson,\r\n featureidkey=self.featureidkey,\r\n locations=\"location_code,\r\n color=self.metric,\r\n mapbox_style=\"carto-positron\",\r\n opacity=0.4\r\n )\r\nfig.update_geos(fitbounds=\"locations\")\r\n```\r\n\r\nWhen calling `fig.show`, the plot opens to the (0,0) location in Gulf of Guinea.\r\n\r\nWhy the `fitbounds` parameter doesn't work on choropleth mapbox?","author":{"url":"https://github.com/mattiatantardini","@type":"Person","name":"mattiatantardini"},"datePublished":"2023-06-26T08:53:34Z","url":"https://github.com/plotly/plotly.py/issues/4262"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:fe2e6ba9-2532-31fb-f57c-39d49eb69f44 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 800A:29FFA9:4C660F4:6072EC2:6B025638 |
| html-safe-nonce | af2e51b87c6f4c9ccccdee17d3af34ae4b08818d4160c2b9940c414224209ab2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDBBOjI5RkZBOTo0QzY2MEY0OjYwNzJFQzI6NkIwMjU2MzgiLCJ2aXNpdG9yX2lkIjoiNDUxNDk1NjE1NDA1NjYyNzc2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dab6f108836c1ea7c92a797a82cfdd3e2039c19cde5428c12dc31b01b87d62c3 |
| hovercard-subject-tag | issue:1774268680 |
| 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/4262/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d4c3785b8498c7dc71a768c080e81aa22df8efec047388197a55183a1b2110db/plotly/plotly.py/issues/4262 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d4c3785b8498c7dc71a768c080e81aa22df8efec047388197a55183a1b2110db/plotly/plotly.py/issues/4262 |
| og:image:alt | The fitbounds parameter appear not to work when used in choropleth mapbox. The only way I found to pass it to the Figure object was to use the update_geos method. The following is a sample of the c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mattiatantardini |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width