FIX: Add mtext into RendererBase._draw_as_path() arguments#31910
FIX: Add mtext into RendererBase._draw_as_path() arguments#31910mervyzr wants to merge 1 commit into
Conversation
# PR Summary --- Missing 1 positional argument 'mtext' in `RendererBase._draw_text_as_path()` (line 509 of `backend_bases.py`). Small fix by including `mtext=mtext` into `RendererBase._draw_text_as_path()`. This error happens when the user is trying to use LaTeX in matplotlib with matplotlib==3.11.0. # AI Disclosure --- All errors and fixes were done manually.
|
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. We also ask that you please finish addressing any review comments on this PR and wait for it to be merged (or closed) before opening a new one, as it can be a valuable learning experience to go through the review process. You can also join us on discourse chat 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. |
|
Thanks! Can you please add a test to ensure this works as expected? |
PR summary
Why is this change necessary?
User might be unable to use LaTeX formatting for plots.
What problem does it solve?
Fixes the
TypeErrorwith missing positional argument forRendererBase._draw_text_as_path()by addingmtext=mtextinto the arguments.What is the reasoning for this implementation?
The function that calls
RendererBase._draw_text_as_path()already includesmtext=Noneas a default argument. Therefore, thismtextis just passed intoRendererBase._draw_text_as_path()too.AI Disclosure
All fixes and code were done manually.
PR checklist