Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Boxplot zorder kwarg#7178

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
NelleV merged 4 commits intomatplotlib:masterfrombcongdon:boxplot-zorder
Sep 29, 2016
Merged

Conversation

bcongdon
Copy link
Contributor

boxplot now accepts thezorder kwarg to set the zorder of the drawn boxplot in the plotting function.

Addresses#7171

@@ -3555,7 +3561,6 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
# empty list of xticklabels
datalabels = []

zorder = mlines.Line2D.zorder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I have a weak preference for this continuing to trackmlines.Line2D.zorder by default, but could very easily be talked into change it.

bcongdon reacted with thumbs up emoji
@tacaswelltacaswell added this to the2.0.1 (next bug fix release) milestoneSep 26, 2016
@tacaswell
Copy link
Member

It is low-risk and an oversight in the API so I think it is reasonable to backport to 2.x. Open to anyone talking me out of this position.

@@ -3095,7 +3095,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
showbox=None, showfliers=None, boxprops=None,
labels=None, flierprops=None, medianprops=None,
meanprops=None, capprops=None, whiskerprops=None,
manage_xticks=True, autorange=False):
manage_xticks=True, autorange=False, zorder=2):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It is better to havezorder=None here so anyone who want to use default value can passNone explicitly.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Good idea. I debated doing it this way, butstreamplot had a default zorder of 2 IIRC, so I went with that convention.

I'll make the change in a bit.

@WeatherGod
Copy link
Member

If streamplot() still has a hardcoded property kwarg, then that is a bug
and needs to be fixed.

On Mon, Sep 26, 2016 at 2:02 PM, Ben Congdonnotifications@github.com
wrote:

@bcongdon commented on this pull request.

In lib/matplotlib/axes/_axes.py
#7178:

@@ -3095,7 +3095,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
showbox=None, showfliers=None, boxprops=None,
labels=None, flierprops=None, medianprops=None,
meanprops=None, capprops=None, whiskerprops=None,

  •            manage_xticks=True, autorange=False):
  •            manage_xticks=True, autorange=False, zorder=2):

Good idea. I debated doing it this way, but streamplot had a default
zorder of 2 IIRC, so I went with that convention.

I'll make the change in a bit.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#7178, or mute the thread
https://github.com/notifications/unsubscribe-auth/AARy-NFh9wQq9hQ7EJbEkZs_nq_67wR8ks5quAjAgaJpZM4KGpZz
.

@bcongdonbcongdonforce-pushed theboxplot-zorder branch 2 times, most recently from9fe3a36 to0723cd5CompareSeptember 26, 2016 20:39
@tacaswell
Copy link
Member

@WeatherGod bug seems a bit strong, just one more piece of technical debt 😉

@bcongdon
Copy link
ContributorAuthor

It looks likestreamplot does still have that hard-coded value. Should I open a separate PR for that issue, or include it in this one?

@efiring
Copy link
Member

On 2016/09/26 1:55 PM, Ben Congdon wrote:

It looks like |streamplot| does still have that hard-coded value. Should
I open a separate PR for that issue, or include it in this one?

A separate PR would be good.

return artists

def bxp(self, bxpstats, positions=None, widths=None, vert=True,
patch_artist=False, shownotches=False, showmeans=False,
showcaps=True, showbox=True, showfliers=True,
boxprops=None, whiskerprops=None, flierprops=None,
medianprops=None, capprops=None, meanprops=None,
meanline=False, manage_xticks=True):
meanline=False, manage_xticks=True, zorder=2):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Can you change this toNone too?

@@ -3382,6 +3385,10 @@ def _update_dict(dictionary, rc_name, properties):
if ci[1] is not None:
stats['cihi'] = ci[1]

# Use default zorder if none specified
if zorder is None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This should be moved tobxp and just let theNone pass through this function.

bcongdon reacted with thumbs up emoji
@bcongdon
Copy link
ContributorAuthor

I made the requested change. Any insight as to why the tests are failing?

@tacaswell
Copy link
Member

the travis test was flaky, that test is known-fail on windows that we have not dealt with yet.

@tacaswelltacaswell changed the titleBoxplot zorder kwarg[MRG+1] Boxplot zorder kwargSep 28, 2016
@NelleVNelleV merged commitf8d05a4 intomatplotlib:masterSep 29, 2016
@NelleV
Copy link
Member

Thanks@bcongdon !

@QuLogicQuLogic changed the title[MRG+1] Boxplot zorder kwargBoxplot zorder kwargOct 15, 2016
QuLogic pushed a commit to QuLogic/matplotlib that referenced this pull requestOct 16, 2016
@QuLogic
Copy link
Member

Backported to v2.x viae801685.

@QuLogicQuLogic removed this from the2.0.1 (next bug fix release) milestoneDec 7, 2016
@QuLogicQuLogic modified the milestones:2.0 (style change major release),2.0.1 (next bug fix release)Dec 7, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@KojoleyKojoleyKojoley left review comments

@tacaswelltacaswelltacaswell approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v2.0.0
Development

Successfully merging this pull request may close these issues.

8 participants
@bcongdon@tacaswell@WeatherGod@efiring@NelleV@QuLogic@Kojoley@mdboom

[8]ページ先頭

©2009-2025 Movatter.jp