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

Fixed hover bug when plotting on inverted axis #4010

Merged
merged 2 commits into from Oct 1, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

Fixed hover bug when plotting on inverted axis

  • Loading branch information
philippjfr committed Oct 1, 2019
commit 73d5cc3d5f01e01b20646991cde5aa75cdb2440c
@@ -89,11 +89,11 @@ def get_data(self, element, ranges, style):
if self.invert_axes:
l, b, r, t = b, l, t, r

dh, dw = t-b, r-l
if self.invert_xaxis:
l, r = r, l
if self.invert_yaxis:
b, t = t, b
dh, dw = t-b, r-l
data = dict(x=[l], y=[b], dw=[dw], dh=[dh])

for i, vdim in enumerate(element.vdims, 2):
@@ -166,13 +166,14 @@ def get_data(self, element, ranges, style):
if self.invert_axes:
img = img.T
l, b, r, t = b, l, t, r

dh, dw = t-b, r-l
if self.invert_xaxis:
l, r = r, l
img = img[:, ::-1]
if self.invert_yaxis:
img = img[::-1]
b, t = t, b
dh, dw = t-b, r-l

if 0 in img.shape:
img = np.zeros((1, 1), dtype=np.uint32)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.