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

Cannot pan zoomed image in plots viewer #8707

Open
2 tasks done
carlsc2 opened this issue Jan 15, 2022 · 7 comments
Open
2 tasks done

Cannot pan zoomed image in plots viewer #8707

carlsc2 opened this issue Jan 15, 2022 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug plot-viewer

Comments

@carlsc2
Copy link

carlsc2 commented Jan 15, 2022

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

When I render an image in the interactive window, expand the image, and attempt to pan after zooming in, the image snaps to the left. It's impossible to analyze an image up close because of this. I'm not sure if the origin of the image makes a difference, but here's the code I used to draw the image:

fig, axes = plt.subplots(1, 3, figsize=(28, 23), sharex=True, sharey=True)
ax = axes.ravel()

ax[0].imshow(cimg, cmap=plt.cm.gray, interpolation='nearest')
ax[0].autoscale(False)
ax[0].axis('off')
ax[0].set_title('Original')

ax[1].imshow(color1, cmap=plt.cm.gray)
ax[1].axis('off')
ax[1].set_title('Connected Components')

ax[2].imshow(color2, cmap=plt.cm.gray)
ax[2].axis('off')
ax[2].set_title('Clean Connected Components')


fig.tight_layout()

Here is a recording of the issue:

2022-01-15.12-26-48.mp4

VS Code Version

Version: 1.63.2 (user setup) Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3 Date: 2021-12-15T09:40:02.816Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19044

Jupyter Extension Version

v2021.11.1001550889

Jupyter logs

No response

Coding Language and Runtime Version

Python 3.8.11

Language Extension Version (if applicable)

v2021.12.1559732655

Anaconda Version (if applicable)

conda 4.10.3

Running Jupyter locally or remotely?

Local

@carlsc2 carlsc2 added bug Issue identified by VS Code Team member as probable bug needs-triage labels Jan 15, 2022
@carlsc2
Copy link
Author

carlsc2 commented Jan 17, 2022

Update: this issue seems to only occur when the image is rectangular - square images pan and zoom correctly.

@amunger
Copy link
Contributor

amunger commented Jan 18, 2022

thanks for the bug, I can repro and it also opens the plotviewer off center for me.

full simple repro for reference:

import numpy as np
import matplotlib.pyplot as plt
fig, axes = plt.subplots(1, 3, figsize=(28, 23), sharex=True, sharey=True)
ax = axes.ravel()

img_rgb = np.array([[[255, 0, 0], [0, 255, 0], [0, 0, 255]],
                    [[0, 255, 0], [0, 0, 255], [255, 0, 0]]
                   ], dtype=np.uint8)

ax[0].imshow(img_rgb, cmap=plt.cm.gray, interpolation='nearest')
ax[1].imshow(img_rgb, cmap=plt.cm.gray)
ax[2].imshow(img_rgb, cmap=plt.cm.gray)

fig.tight_layout()

@greazer greazer added papercut 🩸 Something affecting the productivity of the team plot-viewer and removed needs-triage labels Jan 20, 2022
@amunger amunger removed their assignment Jan 20, 2022
@IanMatthewHuff IanMatthewHuff removed their assignment Nov 10, 2022
@DonJayamanne DonJayamanne removed the papercut 🩸 Something affecting the productivity of the team label Dec 28, 2022
@DonJayamanne
Copy link
Contributor

DonJayamanne commented Dec 14, 2023

@carlsc2 @amunger I can no longer repro this issue
Please could one of you try this and let me know if this is still a problem

thanks

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Dec 14, 2023
@amunger
Copy link
Contributor

amunger commented Dec 15, 2023

yes, still repro's. zoom in and then start to drag - the image shifts dramatically

@DonJayamanne
Copy link
Contributor

thanks,
weird, I cannot repro, thats fine.

@VSCodeTriageBot
Copy link
Collaborator

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
@amunger amunger removed the info-needed Issue requires more information from poster label Feb 6, 2024
@amunger amunger reopened this Feb 6, 2024
@Oreilles
Copy link

Facing this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug plot-viewer
Projects
None yet
Development

No branches or pull requests

7 participants