Bug: pplt.rc.load does not work properly
See original GitHub issueDescription
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
import proplot as pplt
pplt.rc['font.size'] = 10
pplt.rc['axes.labelsize'] = 'med-large'
pplt.rc.save('proplotrc', comment=True, backup=False, description=True)
pplt.rc['font.size'],pplt.rc['axes.labelsize'], pplt.rc['label.size']
It prints (10.0, 'med-large', 'med-large')
The file is indeed updated with the lines
# Changed settings
label.size: med-large
axes.labelsize: med-large
font.size: 10.0
Then I restart the session and load the same file as follows
import proplot as pplt
pplt.rc.load('proplotrc')
pplt.rc['font.size'],pplt.rc['axes.labelsize'], pplt.rc['label.size']
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
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Python Matplotlib RC Parameters not working correctly
Somehow plt.rcParams['axes.labelweight'] = 'bold is not working, but at least the fontsize is now correct. – Camill Trüeb.
Read more >[Bug]: tight_layout (version 3.5+) · Issue #22673 - GitHub
Bug summary fig.tight_layout is broken in current matplotlib. ... If I use plt.ion() , I cannot reproduce your problem on MacOS.
Read more >What's new? — ProPlot documentation
What's new?¶. This page lists the API changes with each version. Please note that when functions and keywords are renamed, they are not...
Read more >Matplotlib 3.6.2 documentation
An object-oriented plotting library. A procedural interface is provided by the companion pyplot module, which may be imported directly, e.g.: import matplotlib ...
Read more >Matplotlib - Introduction to Python Plots with Examples | ML+
So how to draw a scatterplot instead? Well to do that, let's understand a bit more about what arguments plt.plot() expects.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is fixed by 6ea48d5. The issue was that in the
proplotrc
file,font.size
came afterlabel.size
. The internal implementation of_load_file
caused thefont.size
setting to overwrite yourlabel.size
with the default value.Now your example
correctly prints
(10.000000000000002, 'med-large', 'med-large')
.Many thanks for the quick fix!!!