Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
wants to merge 3 commits into from
Closed

Conversation

olgabot
Copy link
Contributor

@olgabot olgabot commented Jan 4, 2014

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/8260601

Current todos are:

  1. set_ticks_location via rcParams
  2. Tell scatter to get_current_color_cycle for the facecolor. Ditto for fill_between and fill_betweenx
  3. Set boxplot colors and lines: https://github.com/olgabot/prettyplotlib/wiki/Examples-with-code#boxplot
  4. Add image.cmap_divergent for data with both negative and positive values in a heatmap
  5. (maybe) allow for only y- or x-axis grids, e.g. for bar plots and histograms https://github.com/olgabot/prettyplotlib/wiki/Examples-with-code#bar-with-a-white-grid-to-erase-and-yet-add-information

Thoughts? Does this look like it's going in the right direction?

@tacaswell
Copy link
Member

The PR title is very misleading as you are adding rcparams, but removing them.

Could you comment on #2637?

@olgabot
Copy link
Contributor Author

olgabot commented Jan 4, 2014

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)]:
Copy link
Member

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).

Copy link
Member

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))

@tacaswell
Copy link
Member

@olgabot Do you want to try to get this into shape to make it into 1.4.0?

@tacaswell tacaswell modified the milestones: v1.4.x, v1.4.0 Apr 17, 2014
@efiring
Copy link
Member

efiring commented Jun 3, 2014

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.

@tacaswell tacaswell modified the milestones: 1.5.0, v1.4.x Feb 7, 2015
@Mrngilles
Copy link
Contributor

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?

@tacaswell
Copy link
Member

You can add olgabot as a remote to your current mpl clone and then make a
branch based on hers and put in a new pr.

On Thu, Mar 5, 2015, 12:16 Gilles Marin [email protected] wrote:

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?


Reply to this email directly or view it on GitHub
#2702 (comment)
.

@tacaswell
Copy link
Member

Closing this as the commits are now part of #4218

attn @olgabot .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants