GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — axes3d panning by emilyfy · Pull Request #18536 · matplotlib/matplotlib

Conversation

@emilyfy

@emilyfy emilyfy commented Sep 21, 2020

Copy link
Copy Markdown
Contributor

PR Summary

not sure why axes3d panning with middle scroll button is not implemented. I'm putting it here and it works as far as I tested.

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and pydocstyle<4 and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@emilyfy
axes3d panning
7255a1a
@dstansby dstansby added topic: mplot3d New feature labels Sep 21, 2020
@QuLogic

QuLogic commented Sep 21, 2020

Copy link
Copy Markdown
Member

Can you write a What's new entry for this? You also have flake8 issues that would need to be fixed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@emilyfy
fix flake8 issues
8af79da
@emilyfy

emilyfy commented Sep 22, 2020

Copy link
Copy Markdown
Contributor Author

@QuLogic sorry about that, I'm not very familiar with the proper formatting. I fixed the mentioned flake8 issues, but what's a what's new entry?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@WeatherGod

WeatherGod commented Sep 22, 2020 via email

Copy link
Copy Markdown
Member
For new features, we add a "what's new" entry that gets collated into a single document for release. The instructions are here: https://matplotlib.org/3.3.1/users/next_whats_new/README.html
…
On Tue, Sep 22, 2020 at 6:16 AM Emily ***@***.***> wrote: @QuLogic <https://github.com/QuLogic> sorry about that, I'm not very familiar with the proper formatting. I fixed the mentioned flake8 issues, but what's a what's new entry? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#18536 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AACHF6FHX55SEXWLDEP74LTSHB2RPANCNFSM4RUCNAFQ> .
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tacaswell tacaswell added this to the v3.4.0 milestone Sep 23, 2020
@tacaswell

tacaswell commented Sep 23, 2020

Copy link
Copy Markdown
Member

Thanks for this @emilyfy ! I suspect the reason it was not implemented is no one had implemented it yet ;).

I checked this out and verified that it works as expected.

Given that this whole block of code is untested I am not going to block merging on that, but if you are feeling motivated, following the pattern in https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/testing/widgets.py is the path to go.


I agree that this is a big enough feature added that we need to make sure it gets advertised in the whats new!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tacaswell
tacaswell approved these changes Sep 23, 2020
View reviewed changes
@emilyfy
added what's new entry
50b8d75
@emilyfy

emilyfy commented Sep 27, 2020

Copy link
Copy Markdown
Contributor Author

I added a short what's new entry.
Sorry again, but I'm not sure what exactly to do for testing the block of code. Is there perhaps a more related example I can refer to, where they test the rotation or zooming in the same _on_move function maybe?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

QuLogic
QuLogic approved these changes Oct 1, 2020
View reviewed changes

@QuLogic QuLogic left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This works pretty well for me. I'm not sure we really have any good way to test 3D interactivity.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
timhoffm
timhoffm reviewed Oct 3, 2020
View reviewed changes
Comment thread lib/matplotlib/testing/widgets.py
def do_event(tool, etype, button=1, xdata=0, ydata=0, key=None, step=1):
"""
Trigger an event
def mock_event(ax, button=1, xdata=0, ydata=0, key=None, step=1):

@timhoffm timhoffm Oct 3, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Git diff looks more complicated than it is. This just extracts the event creation out of do_event().

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@timhoffm

timhoffm commented Oct 3, 2020

Copy link
Copy Markdown
Member

@emilyfy Sorry, for being a bit confusing. Writing the test was actually a bit more difficult than thought, because the do_event() mechanism cannot be applied to mouse operations targeting a 3D Axes. I took the liberty of pushing a test to your branch.

ping @tacaswell @QuLogic for re-review/merge.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@timhoffm
Add a test for panning in 3D axes.
f21c1bb
QuLogic
QuLogic approved these changes Oct 6, 2020
View reviewed changes
@timhoffm
timhoffm merged commit 96670aa into matplotlib:master Oct 6, 2020
@timhoffm

timhoffm commented Oct 6, 2020

Copy link
Copy Markdown
Member

Thanks @emilyfy! Congratulations on your first contribution to Matplotlib. We'd be happy to see you back some time.

emilyfy reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anntzer anntzer mentioned this pull request Oct 6, 2020
Remove accidentally added swapfile. #18674
Merged
7 tasks
@emilyfy
emilyfy deleted the my-feature branch October 7, 2020 05:35
This was referenced Nov 1, 2020
pan and zoom are broken for mplot3d #110
Closed
Add example of keys to explore 3D data #18221
Closed
@QuLogic QuLogic mentioned this pull request Aug 13, 2021
Feature Request: panning and/or changing rotation point in mplot3d #7322
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@timhoffm timhoffm timhoffm left review comments
@tacaswell tacaswell tacaswell approved these changes
@QuLogic QuLogic QuLogic approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

New feature topic: mplot3d

Projects

None yet

Milestone

v3.4.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@emilyfy @QuLogic @WeatherGod @tacaswell @timhoffm @dstansby
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.