Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

create_hexbin_mapbox uses *_map chart types instead of *_mapbox#5358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ajlien wants to merge3 commits intoplotly:main
base:main
Choose a base branch
Loading
fromajlien:update-hexbin-map-no-mapbox

Conversation

ajlien
Copy link

@ajlienajlien commentedOct 1, 2025
edited
Loading

  • I have read through thecontributing notes and understand the structure of the package. In particular, if my PR modifies code ofplotly.graph_objects, my modifications concern the code generator andnot the generated files.
  • I have added tests or modified existing tests.
  • For a new feature, I have added documentation examples (please see the doc checklist as well).
  • I have added a CHANGELOG entry if changing anything substantial.
  • For a new feature or a change in behavior, I have updated the relevant docstrings in the code.

Small change to remove mapbox references from figure factory's hexbin map. See#5081 in particular@danielsaaf'scomment.

Nodocstrings or kwarg names needed to be changed, this is just a substitution.

As a side effect (and the reason I originally came across this issue), currrently if you construct a figure withcreate_hexbin_mapbox then add anothergo.Scattermap trace to it, any maki symbols in the scattermap will not render. This PR also fixes that.

@ajlien
Copy link
Author

Looks like they failed on the same Python code block(1),(2):

import plotly.express as pxfrom skimage import ioimg = io.imread('https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Crab_Nebula.jpg/240px-Crab_Nebula.jpg')fig = px.imshow(img)fig.show()

with

HTTPError: HTTP Error 403: Forbidden

Did upload.wikimedia.org block the resource request?

@emilykl
Copy link
Contributor

Hi@ajlien , thanks for catching this, we should definitely migrate this function to use_map traces.

The doc build failure has been fixed onmain, if you merge main into your branch the issue should be resolved.

We should also deprecatecreate_hexbin_mapbox() and rename it tocreate_hexbin_map(). Could you add the following changes to this branch?

  • Rename the function fromcreate_hexbin_mapbox() tocreate_hexbin_map()
  • Rename themapbox_style arg tomap_style
  • Add a newcreate_hexbin_mapbox() function which shows a DeprecationWarning and then callscreate_hexbin_map(), i.e. something like this:
defcreate_hexbin_mapbox(*args,**kwargs):warnings.warn("create_hexbin_mapbox() is deprecated and will be removed in the next major version. "+"Please use create_hexbin_map() instead. "+"Learn more at: https://plotly.com/python/mapbox-to-maplibre/",stacklevel=2,category=DeprecationWarning,    )if"mapbox_style"inkwargs:kwargs["map_style"]=kwargs.pop("mapbox_style")returncreate_hexbin_map(*args,**kwargs)
  • Updateplotly/figure_factory/__init__.py accordingly

I'm happy to take over this branch if you don't have the bandwidth, but if you get around to it first, go for it! Thanks again.

@ajlien
Copy link
Author

ajlien commentedOct 3, 2025 via email

Thanks Emily! Can do today.
On Wed, Oct 1, 2025, 4:48 PM Emily KL ***@***.***> wrote: *emilykl* left a comment (plotly/plotly.py#5358) <#5358 (comment)> Hi@ajlien <https://github.com/ajlien> , thanks for catching this, we should definitely migrate this function to use _map traces. The doc build failure has been fixed on main, if you merge main into your branch the issue should be resolved. We should also deprecate create_hexbin_mapbox() and rename it to create_hexbin_map(). Could you add the following changes to this branch? - Rename the function from create_hexbin_mapbox() to create_hexbin_map() - Rename the mapbox_style arg to map_style - Add a new create_hexbin_mapbox() function which shows a DeprecationWarning and then calls create_hexbin_map(), i.e. something like this: def create_hexbin_mapbox(*args, **kwargs): warnings.warn( "create_hexbin_mapbox() is deprecated and will be removed in the next major version. " + "Please use create_hexbin_map() instead. " + "Learn more at:https://plotly.com/python/mapbox-to-maplibre/", stacklevel=2, category=DeprecationWarning, ) if "mapbox_style" in kwargs: kwargs["map_style"] = kwargs.pop("mapbox_style") return create_hexbin_map(*args, **kwargs) - Update plotly/figure_factory/__init__.py accordingly I'm happy to take over this branch if you don't have the bandwidth, but if you get around to it first, go for it! Thanks again. — Reply to this email directly, view it on GitHub <#5358 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFOQA5YR7KS3USQPF6KHDAL3VQ4YHAVCNFSM6AAAAACIAXVOCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNJYGA4DANBTHE> . You are receiving this because you were mentioned.Message ID: ***@***.***>

@gvwilson
Copy link
Contributor

thanks@ajlien - this looks good to me. If@emilykl approves as well, we'll get it merged.

@gvwilsongvwilson added P1needed for current cycle communitycommunity contribution fixfixes something broken labelsOct 7, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@gvwilsongvwilsongvwilson approved these changes

Assignees

@emilyklemilykl

@ajlienajlien

Labels
communitycommunity contributionfixfixes something brokenP1needed for current cycle
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ajlien@emilykl@gvwilson

[8]ページ先頭

©2009-2025 Movatter.jp