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

Fixed ErrorBarPlot mpl2.0 compat and made it more general #1131

Merged
merged 1 commit into from Feb 23, 2017

Conversation

Projects
None yet
2 participants
@philippjfr
Member

philippjfr commented Feb 13, 2017

ErrorBars were one of the only failures in our compatibility with mpl 2.0, the difference is that errorbar caps are disabled by default and that the return signature differs. This adds that compatibility and also made the plot correctly animate ErrorBar plots with varying numbers of error bars and adds support for inverting axes on the plot allowing it to be adjoined correctly.

@philippjfr philippjfr added the mpl label Feb 13, 2017

_, (bottoms, tops), verts = ax.errorbar(*plot_data, **plot_kwargs)
handles = ax.errorbar(*plot_data, **plot_kwargs)
bottoms, tops = None, None
if mpl_version >= str('2.0'):

This comment has been minimized.

@jlstevens

jlstevens Feb 13, 2017

Member

So this is the only bit that changes specifically for matplotlib 2.0+?

This comment has been minimized.

@philippjfr

philippjfr Feb 13, 2017

Member

No the update code also had to change because the caps aren't instantiated by default.

@philippjfr

This comment has been minimized.

Member

philippjfr commented Feb 13, 2017

Tests appear to be failing because this display output 46 in Elements has changed. Here is what it looks like:

image

What that has to do with errorbars I do not know.

@jlstevens

This comment has been minimized.

Member

jlstevens commented Feb 13, 2017

Wow..that is a pretty strange side-effect! Definitely no error bars there!

@philippjfr

This comment has been minimized.

Member

philippjfr commented Feb 23, 2017

So I'm super confused now, the test above is meant to look like this:

image

Why would annotations disappear after fixing a completely different plot?

@philippjfr

This comment has been minimized.

Member

philippjfr commented Feb 23, 2017

Figured it out, this is why * imports are bad. The import of Path from matplotlib is getting imported into mpl/__init__.py which ends up overriding our registration of hv.Path, so paths never end up getting plotted.

@jlstevens

This comment has been minimized.

Member

jlstevens commented Feb 23, 2017

The import of Path from matplotlib is getting imported into mpl/init.py which ends up overriding our registration of hv.Path, so paths never end up getting plotted.

Ha! Yes, let's not use glob imports.

Anyway, now that is resolved, this PR looks fine and the tests have passed without needing to be updated. Merging.

@jlstevens jlstevens merged commit 885c1bc into master Feb 23, 2017

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.03%) to 78.18%
Details
s3-reference-data-cache Test data is cached.
Details

@philippjfr philippjfr deleted the errorbars_fix branch Feb 27, 2017

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