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
“Size” ignored if placed before fontproperties #16389
Comments
Somehow If IMHO expicit font-related keywords like This is a good first issue to dig into. Please include a test based on the above example to validate the fix. |
However, if we get passed an actual Which is a very long way of saying "I agree with @timhoffm". |
I'd be happy to take a look at this if you wouldn't mind? From a quick dig around (and @timhoffm's comment) I think it's coming from matplotlib/lib/matplotlib/artist.py Lines 968 to 993 in c91d7ef
The simplest solution I can think of would be to pop |
See #16328 where I'm basically trying to get rid of this kind of kwargs reordering... I think the proper solution would be for FontProperties to properly keep unset properties as being, well, unset, and not overwriting already existing properties on the text object. Also, I guess this raises some other questions, e.g. in
should the second call reset the size to the rc default? (Note that in the base case here, passing |
Is anyone else currently working on this? If not I'll give it a try. |
@RiazCharania go for it. The first step is to clarify the expected behavior. See #16389 (comment) and #16389 (comment). I that you provide a short summary defining the behavior for all cases before implementing. |
We'll give it a try too |
Co-authored-by: Robert Augustynowicz <robert.augustynowicz@mail.utoronto.ca> Closes: matplotlib#16389
Co-authored-by: Robert Augustynowicz <robert.augustynowicz@mail.utoronto.ca> Closes: matplotlib#16389 Previously, setting Text's FontProperties overwrites any old properties After the change, setting Text's FontProperties merges with old properties
Co-authored-by: Robert Augustynowicz <robert.augustynowicz@mail.utoronto.ca> Closes: matplotlib#16389
Co-authored-by: Robert Augustynowicz <robert.augustynowicz@mail.utoronto.ca> Closes: matplotlib#16389
Co-authored-by: Robert Augustynowicz <robert.augustynowicz@mail.utoronto.ca> Closes: matplotlib#16389
Co-authored-by: Robert Augustynowicz <robert.augustynowicz@mail.utoronto.ca> Closes: matplotlib#16389
Co-authored-by: Robert Augustynowicz <robert.augustynowicz@mail.utoronto.ca> Closes: matplotlib#16389
Bug report
Bug summary
In
as.text
,ax.set_title
and all the functions realated to displaying characters on the figure,the arguement
size
is ignored if it is placed before fontproperties.Code for reproduction
This issue is replicated with ipython (%pylab) and jupyter-notebook
Actual outcome
Expected outcome
Matplotlib version
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inlineconda install -c conda-forge matplotlib
The text was updated successfully, but these errors were encountered: