-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Added text-as-path functionality to backend_ps.py for Issue #8480 #30830
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
base: main
Are you sure you want to change the base?
Conversation
previously-committed psuedo-code
|
@story645 I wanted to verify something real quick: Is the PS backend using 1,000 units per EM? Nevermind, found the UPM from the afm font files. |
to get the font size
…/matplotlib-dev into newfeature-for-issue-8480
…/matplotlib-dev into newfeature-for-issue-8480
previously-committed psuedo-code
previously-committed psuedo-code
Added pytest for new feature, rebased commits Removed trailing whitespace Implemented pytest for new feature Removed whitespace Fixed coding style Further fixed coding style Further fixed coding style. Sigh. Updated backend_ps.py to call the proper function to get the font size Rebased commits to only have one copy of the new base image
Removed trailing whitespace in backend_ps.py Properly implemented the new feature from previously-committed psuedo-code Fixed coding style Added pytest for new feature, rebased commits
Removed trailing whitespace Implemented pytest for new feature Removed whitespace Fixed coding style Further fixed coding style Further fixed coding style. Sigh. Updated backend_ps.py to call the proper function to get the font size
…/matplotlib-dev into newfeature-for-issue-8480
|
@rcomer I might need some guidance on how to properly rebase my branch for a new base image. It's honestly my first time utilizing squash or rebase at all for that matter. |
|
Hi @gigoiy we have instructions for interactive rebase here. Definitely make a backup copy of your branch first! https://matplotlib.org/devdocs/devel/development_workflow.html#rewrite-commit-history |
|
@rcomer Definitely already made a backup copy before making this mess lol! I'll continue to tackle this on Monday |
This is a draft PR!!!
PR summary
Why is this change necessary?: This change is necessary so that users have the ability to save text as vector images
What problem does it solve?: The inability to not be able to save text as vector images for the PS backend restricts matplotlib's usage in scientific journals where text being embedded as an image is a requirement
What is the reasoning for this implementation?: A user opened an issue asking for this feature because it was a requirement to submit his/her/their paper to a scientific journal
Changes Made:
backend_ps.pyusing a newrcparamcalledps.pathtextrcsetup.pyto attach thevalidate_bool()validator tops.pathtextmatplotlibrcto includeps.pathtext's default valueFalsetyping.pyto includeps.pathtextbackend_ps.pyto handle math text properly when calling the new feature and fix recursivenessbackend_ps.pyto use the proper method name when callingget_size()generate_pstext.pyto help with generating the baseline imagetest_pathtext.pytopytestthe new featureSupposed to close Issue #8480
PR checklist