Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seaborn.objects: Add formatting string argument to Text mark #3427

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

qiemem
Copy link
Contributor

@qiemem qiemem commented Jul 23, 2023

Adds a fmt argument to the so.Text mark, allowing the user to pass in a format string to format the text before display. I also considered having it just take in a function, similar to .label's arguments. Let me know if that would be preferred.

@qiemem qiemem changed the title Add formatting string argument to Text mark seaborn.objects: Add formatting string argument to Text mark Jul 23, 2023
@codecov
Copy link

codecov bot commented Jul 23, 2023

Codecov Report

Merging #3427 (f560cbe) into master (3ef2a0f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3427   +/-   ##
=======================================
  Coverage   98.32%   98.32%           
=======================================
  Files          77       77           
  Lines       24303    24309    +6     
=======================================
+ Hits        23897    23903    +6     
  Misses        406      406           
Impacted Files Coverage Δ
seaborn/_marks/text.py 100.00% <100.00%> (ø)
tests/_marks/test_text.py 100.00% <100.00%> (ø)

@JanPalasek
Copy link

@mwaskom is there some problems with this PR?
For instance I find myself needing this functionality in a lot of plots. To bypass this, I use apply with pandas to create a new formatted column.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants