Closed syrte closed 2 years ago
The problem can be located to pplt.rc._load_file
.
It seems that a lot of things get updated when rc loads the fontsize from file, which can overwrite the setting of labelsize. If the file stores the keys in a different order:
font.size: 10.0
label.size: med-large
axes.labelsize: med-large
Then the labelsize setting is ensured to use the file value.
I will be satisfied with the above workaround for now. If I got time, I may dig a bit more.
Thanks for the report. Note the reason font.size
also updates all those other font settings is related to #212. When fontsize
is passed to ax.format()
we have to re-apply the font scalings like 'medium'
and 'large'
now that they are derived from a different base font.size
. I guess something about the order of application is messing this up.
This is fixed by 6ea48d5. The issue was that in the proplotrc
file, font.size
came after label.size
. The internal implementation of _load_file
caused the font.size
setting to overwrite your label.size
with the default value.
Now your example
import proplot as pplt
pplt.rc.load('proplotrc')
pplt.rc['font.size'],pplt.rc['axes.labelsize'], pplt.rc['label.size']
correctly prints (10.000000000000002, 'med-large', 'med-large')
.
Many thanks for the quick fix!!!
Description
pplt.rc.load does not work properly. I found the problem when I was playing with
~/.proplotrc
. The same problem appears as in the following example.Steps to reproduce
I save a rc file as follows
It prints
(10.0, 'med-large', 'med-large')
The file is indeed updated with the lines
Then I restart the session and load the same file as follows
It prints
(10.000000000000002, 'medium', 'medium')
.Proplot version
Paste the results of
import matplotlib; print(matplotlib.__version__); import proplot; print(proplot.version)
here. 3.4.3 0.9.5.post259