-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add spines and ticks in rcParams #2702
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
Conversation
The PR title is very misleading as you are adding rcparams, but removing them. Could you comment on #2637? |
Ah my bad about the title - changed it to be more clear. In my head I was thinking that "you should be able to remove the spines via rcParams" but I see how the title was murky. Taking a look at the other PR now. |
@@ -458,6 +458,9 @@ def linear_spine(cls, axes, spine_type, **kwargs): | |||
else: | |||
raise ValueError('unable to make path for spine "%s"' % spine_type) | |||
result = cls(axes, spine_type, path, **kwargs) | |||
if not rcParams['axes.spines.{0}'.format(spine_type)]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a .get
call in case "type" is something else (from a subclass of Axes).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would also make it more clear what the default value was result.set_visible(rcParams.get('axes.spines.{}'.format(spine_type), True))
@olgabot Do you want to try to get this into shape to make it into 1.4.0? |
It looks like this is not going to make it into 1.4.0, but I encourage continuing with it; it fits in with the new style mechanism. Although we are conservative about changing long-established default behavior, we certainly would like to see design improvements such as your prettyplot become directly accessible in mpl without needing any external library. Maybe this should be a focus for 1.5. |
Maybe a silly question, but if I want to get this going, do I need to clone olgabot repo, and then submit an other PR? |
You can add olgabot as a remote to your current mpl clone and then make a On Thu, Mar 5, 2015, 12:16 Gilles Marin [email protected] wrote:
|
Hello there,
I started working on this PR to make my
prettyplotlib
library obsolete by allowing you to do everything via rcParams.So far I've only gotten the
spines
to work: http://nbviewer.ipython.org/gist/olgabot/8260601Current todos are:
set_ticks_location
via rcParamsscatter
toget_current_color_cycle
for thefacecolor
. Ditto forfill_between
andfill_betweenx
boxplot
colors and lines: https://github.com/olgabot/prettyplotlib/wiki/Examples-with-code#boxplotimage.cmap_divergent
for data with both negative and positive values in a heatmapThoughts? Does this look like it's going in the right direction?