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

Update matrix.py #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PhilipeRLeal
Copy link

Type of changes:

Enhancement:

  1. The heatpmap can now accept matplotlib.Formatters in the 'fmt' Parameter (which is used for annotating texts within the plots).

Usage Example

def strf(x, y=None):
return '{0:.2f}'.format(x).replace('.', ',')
data # a pandas dataframe

sns.heatmap(data,
ax=ax,
fmt=formatter.FuncFormatter(strf),
cmap='viridis',
annot=True
)

Implications:

None

The heatpmap can now accept matplotlib.Formatters as the 'fmt' Parameter for annotating texts within the plots.

here is a case example:

def strf(x, y=None):
    return '{0:.2f}'.format(x).replace('.', ',')
data # a pandas dataframe

sns.heatmap(data,
                      ax=ax,
                      fmt=formatter.FuncFormatter(strf),
                      cmap='viridis',
                      annot=True
           )
There was a missing '(' in line 210. It is now fixed.
@PhilipeRLeal
Copy link
Author

Let me know of your thoughts regarding this Pull Request (PR).

Sincerely,

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