ENH: errorbar color cycle clean up #5593

Merged
merged 7 commits into from May 30, 2016

Conversation

Projects
None yet
3 participants
Owner

tacaswell commented Dec 1, 2015

@mdboom This is what I was talking about on the phone call.

tacaswell changed the title from WIP to WIP: errorbar color cycle clean up Dec 1, 2015

tacaswell added this to the unassigned milestone Dec 1, 2015

Owner

mdboom commented Dec 1, 2015

Great -- this definitely addresses part of #5584 in a better way. Should we also remove the use of Axes.plot in favor of Axes.line2d while we're in there?

@tacaswell tacaswell MNT: start to use artists directly in errorbar
Instead of using calls to `plt.plot`
c8a365a

tacaswell added some commits May 13, 2016

@tacaswell tacaswell MNT: rename styles dictionaries
Need 3 internal style dictionaries:

  - eb_lines_style : used for the line collections
  - eb_cap_style : base style to be used for the bar 'caps'
  - plot_line_style : used from the 'main' line
9acfc5f
@tacaswell tacaswell MNT: remove unneeded re-setting of colors 06e55e6
@tacaswell tacaswell MNT: use zorder for barsabove d6881f0
@tacaswell tacaswell MNT: remove alaises
e6e48bd
Owner

tacaswell commented May 13, 2016

The decision to consult the prop-cycle still needs to be fixed.

attn @WeatherGod

Owner

tacaswell commented May 13, 2016

and is this a 2.0 or 2.1 tagged issue?

@tacaswell tacaswell PEP8
6b17610

tacaswell closed this May 23, 2016

tacaswell reopened this May 23, 2016

jenshnielsen self-assigned this May 23, 2016

@jenshnielsen jenshnielsen and 1 other commented on an outdated diff May 25, 2016

lib/matplotlib/axes/_axes.py
- if not iterable(uplims):
- uplims = np.array([uplims] * len(x), bool)
- else:
- uplims = np.asarray(uplims, bool)
+ if plot_line:
+ l0 = mlines.Line2D(x, y, **plot_line_style)
+ self.add_line(l0)
@jenshnielsen

jenshnielsen May 25, 2016

Owner

Nitpick this variable name looks a bit to close to 10 I first read the line as self.add_line(10)

@tacaswell

tacaswell May 25, 2016

Owner

Indeed, will fix that.

@jenshnielsen jenshnielsen commented on the diff May 25, 2016

lib/matplotlib/axes/_axes.py
- # arrays fine here, they are booleans and hence not units
- if not iterable(lolims):
- lolims = np.asarray([lolims] * len(x), bool)
- else:
- lolims = np.asarray(lolims, bool)
+ # For backwards-compat, allow explicit setting of
+ # 'markeredgewidth' to over-ride capthick.
+ for key in ('markeredgewidth', 'transform', 'alpha',
@jenshnielsen

jenshnielsen May 25, 2016 edited

Owner

Are we normalising mew out somewhere else?

Never mind I can read it's done at the top by normalize_kwargs

Owner

jenshnielsen commented May 25, 2016

👍 @tacaswell Does this need more work ([WIP] in the title) of is it ready?

tacaswell changed the title from WIP: errorbar color cycle clean up to ENH: errorbar color cycle clean up May 25, 2016

@tacaswell tacaswell MNT: remove misleading variable name
'l0' (el-zero) looks too much like 10 (ten) to be used as a variable
name.
2338e2e
Owner

tacaswell commented May 28, 2016

This should be ready to go.

@jenshnielsen jenshnielsen merged commit 597d2ef into matplotlib:master May 30, 2016

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 69.782%
Details

@jenshnielsen jenshnielsen added a commit to jenshnielsen/matplotlib that referenced this pull request May 30, 2016

@jenshnielsen @jenshnielsen jenshnielsen + jenshnielsen Merge pull request #5593 from tacaswell/fix_errorbar_cycleing
ENH: errorbar color cycle clean up
acfab37
Owner

jenshnielsen commented May 30, 2016

Back port to 2.x as acfab37

tacaswell deleted the tacaswell:fix_errorbar_cycleing branch May 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment