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

fix: custom category order was hard-coded#5000

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

Merged
emilykl merged 2 commits intoplotly:masterfromMarcoGorelli:hardcoded-var
Jan 30, 2025

Conversation

MarcoGorelli
Copy link
Contributor

@MarcoGorelliMarcoGorelli commentedJan 30, 2025
edited
Loading

closes#4999

FBruzzesi reacted with heart emojiFBruzzesi reacted with rocket emoji
@MarcoGorelliMarcoGorelli marked this pull request as ready for reviewJanuary 30, 2025 09:22
"On Route",
"Delivered",
]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I was doing a similar fix 🙈

You could also add the comparison withgo.Pie:

values_=np.array([x[0]forxinsorted(zip(data["count"],data["status"]),key=lambdat:custom_order.index(t[1]))    ])trace=go.Pie(values=values_,labels=custom_order,    )_compare_figures(trace,fig)

MarcoGorelli reacted with thumbs up emojiMarcoGorelli reacted with heart emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

yup, thanks for reviewing!

FBruzzesi reacted with heart emoji
nw.col("b")
.replace_strict(order,range(len(order)), return_dtype=nw.UInt32)
nw.col(names)
.replace_strict(order,np.arange(len(order)), return_dtype=nw.UInt32)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@MarcoGorelli What's the reason for usingnp.arange here rather thanrange? Is there a performance difference?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

yes,@FBruzzesi had noted that it was generally more performant, and numpy is still required in plotly express anyway - no objections to changing this back of course!

emilykl reacted with thumbs up emoji
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yup, makes sense to me, thanks!

Copy link
Contributor

@emilyklemilykl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good@MarcoGorelli , thanks for the fix. 🎉

MarcoGorelli reacted with thumbs up emoji
@MarcoGorelli
Copy link
ContributorAuthor

thanks for your review!

emilykl reacted with rocket emoji

@emilyklemilykl merged commitd974535 intoplotly:masterJan 30, 2025
4 checks passed
@LiamConnorsLiamConnors mentioned this pull requestMar 13, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@emilyklemilyklemilykl approved these changes

@FBruzzesiFBruzzesiFBruzzesi left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

px.pie raisesColumnNotFoundError whennames andcategory_order is passed at the same time on plotly 6.0.0
3 participants
@MarcoGorelli@emilykl@FBruzzesi

[8]ページ先頭

©2009-2025 Movatter.jp