-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Make our "inline" matplotlib rc_param overwrite a classic-inline theme #9710
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
Breaking this down into at least three(four) different parts:
|
Ok, so 0. can be found in this commit in ipykernel as of right now its rc = Dict({'figure.figsize': (6.0,4.0),
# play nicely with white background in the Qt and notebook frontend
'figure.facecolor': (1,1,1,0),
'figure.edgecolor': (1,1,1,0),
# 12pt labels get cutoff on 6x4 logplots, so use 10pt.
'font.size': 10,
# 72 dpi matches SVG/qtconsole
# this only affects PNG export, as SVG has no dpi setting
'savefig.dpi': 72,
# 10pt still needs a little more room on the xlabel:
'figure.subplot.bottom' : .125
},
help="""Subset of matplotlib rcParams that should be different for the
inline backend."""
).tag(config=True) Next is to figure out the |
I suggest that you you do 0 and 1 via by implementing matplotlib/matplotlib#6738 and then using it from inside an ipython notebook with mpl 1.5 Or just start from https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/mpl-data/stylelib/classic.mplstyle You can just add a path to https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/style/core.py#L33 mpl should probably grow a nicer API for managing that list. |
This has been bumped through several minor release milestones now. Is anyone intending to work on it, or shall we wishlist it? |
Wishlist'ed |
- Add margin property to `element_text` - Put global options in separate file and add accessor methods - Add `strip_margin` themeable to control separation/overlap between the `strip_text` and the panel. - Remove `gg_context` and use `mpl.rc_context` and `theme.apply_rcparams`. - Remove hardcoded default legend key sizes and let `legend_key_height` serve as the default. - Make `theme_538` and `theme_xkcd` subclasses of `theme_gray` and use theme elements to implement theme. - Use smaller test images. - Allow tests to pass arguments to the savefig method. - Save with default dpi equal to the theme dpi Because of IPython/Ipykernel playing around with the dpi, the theme dpi has no effect on the inline plots. So the saved image is still different from the inline plot. See: ipython/ipython#9710
Just a little update: the RC overrides have been removed in ipython/matplotlib-inline#14 From today's POV, would it still make sense to create an "inline" theme? |
My thought is no - that we should finish fixing any small defaults deviations we might have there (looking at the dpi issue you mentioned) but otherwise let users access the normal matplotlib mechanisms as much as possible. I think we should close this, but will wait a bit in case there's a difference of opinion. |
See matplotlib/matplotlib#6696 (comment)
That should prevent/ help with a lot of issues.
The text was updated successfully, but these errors were encountered: