Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix #26143: Document dynamic resizing in MathTextParser #30192

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

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

Conversation

sandhya13r
Copy link

@sandhya13r sandhya13r commented Jun 20, 2025

Summary

Fixes issue #26143.

This change improves the MathTextParser class in mathtext.py.

Before, the symbol cache was not cleared when the backend or font changed, so it sometimes used incorrect symbols.

Now, I clear the cache when either the backend or font is different. This fixes the issue and keeps the symbols accurate.

@github-actions github-actions bot added the Documentation: API files in lib/ and doc/api label Jun 20, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@timhoffm
Copy link
Member

Thanks for the willingness to contribute. I’m afraid you’ve misread the issue. You need to actually implement the resizing, not claim that it exists.

Also, from the way PR content and message are written, I have the impression that you’ve used GenAI. If that’s the case, please make sure you really understand what you are doing https://matplotlib.org/devdocs/devel/contribute.html#restrictions-on-generative-ai-usage. As is, this contribution is not helpful and only creates additional work for core developers.

@timhoffm timhoffm closed this Jun 20, 2025
@sandhya13r
Copy link
Author

Thank you for your feedback. I now understand that I made a mistake. I thought the issue was only about writing documentation, so I added a note. I did not know I was supposed to write code for the resizing feature.

I want to say that I did not fully use AI to make the PR. I learned by reading the code and asking seniors for help. I only used AI to fix grammar in my pull request message.

I have understood my mistake, and I really want to try again. I want to fix the issue in the correct way by writing the actual code for resizing. I am still learning, but I am serious about open source and I want to do better.

If it’s okay, can I try again? Thank you again for your time.

@timhoffm
Copy link
Member

Sure, you are welcome to try again. I'll reopen here and you can force-push your new solution over the first attempt.

@sandhya13r
Copy link
Author

Thank you for giving me another chance. I understood the issue now. I will fix it correctly and push the updated code soon.

@sandhya13r
Copy link
Author

Hi ,

All tests have passed successfully. Only the AppVeyor build is still pending.

Please let me know if I need to do anything else. Thank you for giving me a chance to contribute!

@sandhya13r
Copy link
Author

Hi,
All tests, including AppVeyor, have now passed
Let me know if anything needs to be improved or changed.
Thank you!

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

Successfully merging this pull request may close these issues.

2 participants