Skip to content

Native and Backends versatile fullscreen command #17710

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

Closed
wants to merge 18 commits into from
Closed

Native and Backends versatile fullscreen command #17710

wants to merge 18 commits into from

Conversation

Luluser
Copy link

@Luluser Luluser commented Jun 22, 2020

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Sharing my work with different persons I have dealt with them having different OS and Matplotlib Backend and had to play pingpong game with trial and errors to make it work on their desktop.
I think for example that a backend versatile fullscreen command would be great. I have found examples on the web quite easily but even then in some cases it didn't work on my colleagues' computers.
Here is a slightly different code I modified from the one I found :

    plot_backend = get_backend()
    mng = plt.get_current_fig_manager()
    if plot_backend == 'TkAgg':#Seems to be the most used backend
        try:
            mng.window.state('zoomed')#for Windows users
        except _tkinter.TclError:
            mng.resize(*mng.window.maxsize())#for Ubuntu users
    elif plot_backend == 'wxAgg':
        mng.frame.Maximize(True)
    elif plot_backend == 'Qt4Agg':
        mng.window.showMaximized()   

I am new to pull request some I mark it as a draft one. There are probably some cases forgotten, I don't pretend this code is perfect on the contrary your recommendations and enhancements are welcomed.

timhoffm and others added 18 commits June 18, 2020 16:46
…667-on-v3.3.x

Backport PR #17667 on branch v3.3.x (Don't linewrap css in svg header.)
…668-on-v3.3.x

Backport PR #17668 on branch v3.3.x (Don't pass "wrong" `indent=False` in SVG generation.)
…675-on-v3.3.x

Backport PR #17675 on branch v3.3.x (DOC: specify that the LaTeX installation needs to include cm-super)
…665-on-v3.3.x

Backport PR #17665 on branch v3.3.x (Document that some single char colors are shaded)
…664-on-v3.3.x

Backport PR #17664 on branch v3.3.x (Clarify docs of AutoDateLocator.intervald)
…676-on-v3.3.x

Backport PR #17676 on branch v3.3.x (FIX: correctly process the tick label size)
…680-on-v3.3.x

Backport PR #17680 on branch v3.3.x (MNT: migrate away from deprecated c-api)
…686-on-v3.3.x

Backport PR #17686 on branch v3.3.x (Fix tooltip for wx toolbar.)
…687-on-v3.3.x

Backport PR #17687 on branch v3.3.x (Mention keyboard modifiers in toolbar tooltip texts.)
@Luluser Luluser changed the title Native and Backends volatile fullscreen command Native and Backends versatile fullscreen command Jun 22, 2020
@tacaswell
Copy link
Member

@Luluser in the future can you please either open an issue (when you want to start a discussion but don't have any code committed) or commit the code you want to have considered on a branch and open a pull request from your fork on github into the canonical one.

In this PR you have proposed merging our v3.3.x branch (which is the backport branch for the 3.3.x series, see https://matplotlib.org/3.3.0/devel/coding_guide.html#current-branches ). While we do "merge up" the the bug fix branches to the master branch, I don't think it is what you actually want to talk about here.

I am going to close this PR (because it going to cause confusion) and copy the body of the text to an issue.

@Luluser
Copy link
Author

Luluser commented Jun 24, 2020

@Luluser in the future can you please either open an issue (when you want to start a discussion but don't have any code committed) or commit the code you want to have considered on a branch and open a pull request from your fork on github into the canonical one.

In this PR you have proposed merging our v3.3.x branch (which is the backport branch for the 3.3.x series, see https://matplotlib.org/3.3.0/devel/coding_guide.html#current-branches ). While we do "merge up" the the bug fix branches to the master branch, I don't think it is what you actually want to talk about here.

I am going to close this PR (because it going to cause confusion) and copy the body of the text to an issue.

I feel sorry about this, both github and matplotlib operation are new to me and my english is definitely not perfect. I had issues figuring out how things worked and what should have I done. Again sorry about it.

@timhoffm
Copy link
Member

No worries. We've all been novices at some point. Thanks for sharing your thoughts.

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.

7 participants