[Matplotlib-users] Matplotlib, Qt, and borders

Israel Brewster ijbrewster at alaska.edu
Fri Mar 29 13:43:28 EDT 2019


I’m new to matplotlib, and using it in conjunction with Qt as per https://matplotlib.org/gallery/user_interfaces/embedding_in_qt_sgskip.html <https://matplotlib.org/gallery/user_interfaces/embedding_in_qt_sgskip.html>, which works well. However, I’m struggling with borders, especially as the user resizes the window. 

What it looks like is that the left, right, bottom and top parameters to subplots_adjust are in percents - is that correct? If so, is there a way to change it to pixels? As things stand, when the user adjusts the size of the window, the “gap” between an edge of the graph and the edge of the container changes. More troubling is that as the window gets smaller, the graph labels get cut off.

Ideally I’d like to be able to say “fit the entire graph (including axes labels) inside the parent object with x number of pixels padding on each side”. Of course there would be some minimum size you couldn’t effectively go below. Is that possible?
---
Israel Brewster
Software Engineer
Alaska Volcano Observatory 
Geophysical Institute - UAF 
2156 Koyukuk Drive 
Fairbanks AK 99775-7320
Work: 907-474-5172
cell:  907-328-9145

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20190329/09d9c6c2/attachment.html>


More information about the Matplotlib-users mailing list