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

Allow automatic extent scaling on line annotations #3761

Merged
merged 3 commits into from Jun 21, 2019
Merged

Conversation

poplarShift
Copy link
Collaborator

@poplarShift poplarShift commented Jun 6, 2019

Fixes #3759

The following is now possible:

import holoviews as hv
hv.extension('bokeh')
import numpy as np

hv.VLine(-1).opts(apply_ranges=True, padding=.1) * hv.Scatter(np.random.rand(100,2))

Note that in the matplotlib backend ranges were apparently already applied before then.

@@ -130,6 +130,8 @@ class LineAnnotationPlot(ElementPlot, AnnotationPlot):

style_opts = line_properties + ['level']

apply_ranges = False
Copy link
Member

@philippjfr philippjfr Jun 21, 2019

Choose a reason for hiding this comment

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

I think this should probably be a boolean parameter.

Copy link
Collaborator Author

@poplarShift poplarShift Jun 21, 2019

Choose a reason for hiding this comment

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

Ah, of course.

@poplarShift poplarShift requested a review from philippjfr Jun 21, 2019
@philippjfr philippjfr merged commit fd57be8 into master Jun 21, 2019
3 of 4 checks passed
@philippjfr philippjfr deleted the line_annot_extent branch Aug 5, 2019
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.

2 participants