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

Add context manager for managing font properties #4

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

Conversation

vinisalazar
Copy link

@vinisalazar vinisalazar commented May 9, 2024

Hi @erdogant,

I came up with this potential solution for #3 which only adds one line (269). The other changes are merely an indent to bring the code block inside the context body.

However, I would go one step further and add an argument to this function allowing to set the font family. I can add it to this PR, or open a new one. If these are merged, I can also see about incorporating the changes into the scatterd calls in the pca package.

Let me know what you think.

Thank you,
Vini

Summary of changes

  • In function _set_font_properties, use matplotlib.rc_context()

This resets the rcParams upon leaving the context body, which prevents the parameters set here
from interfering with the rest of the figure.

  - In function _set_font_properties, use matplotlib.rc_context()

  This resets the rcParams upon leaving the context body, which prevents the parameters set here
  from interfering with the rest of the figure.
@vinisalazar vinisalazar changed the title Add context manager for managing font properties (#3) Add context manager for managing font properties May 9, 2024
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.

1 participant