Closed syrte closed 1 year ago
I think I see the problem -- the rc
state is not reset by Configurator.__exit__
during the error because the error is triggered inside Configurator.__enter__
rather than inside the with...as
block. This leaves rc
in a "user-modification" context mode rather than an "initialization" mode, so the initial values for ax._title_loc
and ax._abc_loc
are unset.
I think the solution is to validate rc values inside of pplt.rc.context
rather than inside of pplt.Configurator.__enter__
and simplify the content in __enter__
, and/or use a try...except
block in __enter__
that calls __exit__
if necessary.
This was a very simple fix -- should have done it much sooner. Fixed by c567329 with a simple try-except clause.
Description
When I was adjusting the axes titles of a figure, something seemed to break the internal state of proplot. The package does not work anymore, see the error message below. I have no choice but restart the whole python session.
Steps to reproduce
I tried the following code
It complains "gray10" is not a good color as follows
The problem is that I can not make any new figures since then. When I start a new figure in a jupyter cell
I get the following error
Proplot version
Paste the results of
import matplotlib; print(matplotlib.__version__); import proplot; print(proplot.version)
here. 3.4.3 0.9.5.post284