Skip to content
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

xextents of overlay of raster and HLine #1079

Closed
vascotenner opened this issue Jan 25, 2017 · 5 comments
Closed

xextents of overlay of raster and HLine #1079

vascotenner opened this issue Jan 25, 2017 · 5 comments
Assignees
Labels
type: bug Something isn't correct or isn't working

Comments

@vascotenner
Copy link
Contributor

When drawing a line outside the extents of an Raster/Image, the extents of the overlay grow such that the line is also visible.

Works for VLine
hv.Raster(np.random.rand(100,100))*hv.VLine(x=120)
download

Does not work for HLine: xaxis extended instead of yaxis
hv.Raster(np.random.rand(100,100))*hv.HLine(y=120)
download 1

@jlstevens jlstevens added the type: bug Something isn't correct or isn't working label Jan 25, 2017
@jlstevens
Copy link
Contributor

Definitely seems to be a bug. Thanks for reporting this.

@philippjfr
Copy link
Member

It seems the HLine and VLine plots classes have never implemented a custom get_extents method. Should be trivial to implement one.

@philippjfr philippjfr self-assigned this Jan 25, 2017
@philippjfr
Copy link
Member

Actually had we not decided that certain annotations should not be considered when computing the bounds? If that regressed then that would explain why we hadn't noticed this before.

@jlstevens
Copy link
Contributor

We did discuss it before but I can't remember what we decided. Personally I would quite like for annotations to be included in the bounds calculation but there could be a good reason not to. I don't mind either way as long as we are consistent.

@jbednar
Copy link
Member

jbednar commented Jan 25, 2017

There is certainly an argument for not considering line annotations when computing the bounds (though of course it would need to be both types of such annotations). E.g. one may want to provide a red line to mark a danger threshold, and as long as that threshold is never reached, there's no reason to enlarge the display to include it. But there are also other cases when one might want to include the location of the annotation, so maybe there should be a configuration option to determine whether annotations affect the extents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

4 participants