-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
matplotlibrc parsing is inconsistent with matplotlibrc.template #9184
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
Comments
Here is the email from Emlyn Price:
|
@efiring I found this as well during a matplotlib customization tutorial I ran, but then forgot to follow through with it. Would your suggested fix be to improve the parser or to fix the example matplotlibrc? If the latter, happy to submit a PR. In the long term, it would be great if mpl applied some dogfooding here: the example should actually be loaded as the default style on launch. (Maybe?) |
Improving the parser would be better--but so far it is needed only for this one entry, and I don't think it is trivial. I think that an immediate fix to the template would be worth doing, and simple enough to slip in before the actual 2.1 release. It's possible that longer term we might change the matplotlibrc handling in a more fundamental way, making it even less inviting to try to change the parsing right now. So, "yes, please" to your PR offer. |
If we want to fix the parser while keeping the matplotlibrc format (which, I've argued in other places, is not a great idea IMO -- just switching to Python expressions would make our life much simpler), the easiest would probably be to support explicit backslash line continuations. |
Otherwise the example is invalid because the matplotlibrc parser doesn't understand multi-line commands. See #9184.
Closing as the issue of fixing the parser is already tracked by other issues e.g. #7089. |
matplotlib._rc_params_in_file looks for
key : value
pairs on a single line, but the matplotlibrc.template has a multiline entry foraxes.prop_cycle
. If you uncomment that entry in a matplotlibrc file, it will fail.This was pointed out in an email to matplotlib-users on 9/13.
It applies to master (and the 2.1rc).
The text was updated successfully, but these errors were encountered: