-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Initial plot window ignoring rcParams figure.figsize #10555
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
Comments
As already commented on the SO question this is hard to reproduce. So anything you can add concerning the configuration in use may help here. |
I guess I'm confused why anything plots at all w/o a |
I usually use the PyCharm IDE, but I can replicate this from the terminal (which requires using the To address my configuration, I have noticed this problem since I upgraded to a larger monitor. I now use a 3 monitor setup (laptop + 2 external displays approx 15", 23", and 43" respectively). I am running on a lenovo thinkpad T460 and using Ubuntu 16.04 LTS. Let me know what other details you might need. |
I suspect the 15" monitor is the primary one in this setup. Hence the figure is resized to match this screen resolution. |
That's correct, changing the larger screen to the primary display did resolve this. One interesting remaining question though is why does this affect not still occur when I set the size to be 30x20? If I set the size to be this large then surprisingly it then works fine. |
I have updated my answer on Stack Overflow, but to summarise:
|
@beangoben Your issue is completely different. You need to load the inline backend before setting the rcParams. |
I'm going to close this as not a MPL bug.... |
@jklymak Well, it's not a bug, indeed. But the point is maybe that it should be possible to create a figure which is larger than the screen somehow. Ideally I could imagine something like |
As an extension to the suggestion by @ImportanceOfBeingErnest , perhaps a setting in the rcParams to state that the user is aware that they are asking for a larger plotting window than be displayed on screen. |
The limit on window size is imposed by the window manager, so there's really nothing that Matplotlib can do to make it bigger. There is the possibility of adding scrollbars as suggested in #7338. |
@QuLogic Not sure if I understand this restriction. As I see it, it is imposed by matplotlib. As an example, the following creates a Qt Application with a figure size much larger than (my) screen.
Of course a Scrollable window would be equally nice, as seen in this SO question. |
Original plotting window does not initially respect rcParams value
Summary
I
import matplotlib
and then set thercParams
bympl.rcParams.update( {'figure.figsize': (15, 9.3)})
. When I attempt to plot the window, its size is plotted instead as[10.35, 9.3]
and not what I originally specified. This has onlst started occuring since I upgraded to a larger monitor. It does not occur for all inputs, and the larger(32, 20)
plots correctly the first time.Details
I have previously used the following to ensure my figure-size in my plots is a consistent size:
However, I am now finding that for my usual default values
(15, 9.3)
this is being ignored. The following demonstrates this (This must be run in stages, see current output section):The initial plot size is
[10.35, 9.3]
and after it is[15, 9.3]
as desired. If however I make the default very much large or smaller, e.g. (32, 19.3) then the figure window is correctly sized. I thought settingrcParams
is the recommended route?Details:
TkAgg
(I want this kept as it is).I have tried this inside and outside a virtual environment, and also tried Matplotlib versions 2.2 with python 3.5, and still it persists, and with all the backends I can muster (including
Qt5Agg
).Possible known issue:
I have found the following issue 2716 which I think could be related, but there don't appear any fixes suitable for the rcParam settings route.
Current output:
Following the comments below is some example output (done using Python 3 to allow me to install the latest version of matplotlib):
DEMONSTRATION
The text was updated successfully, but these errors were encountered: