<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Tight_layout seems to overlap things in my experience, but I’ll give it another shot. Constrained_layout I’m not familiar with, so definitely something to try. Thanks.<div class=""><br class=""></div><div class="">I’ve always found pixel layout to be much cleaner than percent layouts, but then I’m used to designing web interfaces with a bunch of objects that need to play together nicely when you resize the window, so this is a significantly different application. That said, I was thinking along the lines of setting the border for the figure, not individual axis, but perhaps that’s not how it works?</div><div class=""><br class=""><div class=""><div class="">
<div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">---</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Israel Brewster<br class="">Software Engineer<br class="">Alaska Volcano Observatory <br class="">Geophysical Institute - UAF <br class="">2156 Koyukuk Drive <br class="">Fairbanks AK 99775-7320</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Work: 907-474-5172<br class="">cell:  907-328-9145</div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Mar 29, 2019, at 11:44 AM, Thomas Caswell <<a href="mailto:tcaswell@gmail.com" class="">tcaswell@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Israel,<div class=""><br class=""></div><div class="">You probably want to use `tight_layout` or `constrained_layout` on the embedded figure.</div><div class=""><br class=""></div><div class="">Setting axes position in pixels would get messy if you have more than one Axes in the figure and you want to handle resizing. </div><div class=""><br class=""></div><div class="">See <a href="https://matplotlib.org/tutorials/advanced/transforms_tutorial.html#transformations-tutorial" class="">https://matplotlib.org/tutorials/advanced/transforms_tutorial.html#transformations-tutorial</a> for the stacked coordinate systems that Matplotlib uses.</div><div class=""><br class=""></div><div class="">Tom</div><div class=""><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 29, 2019 at 1:44 PM Israel Brewster <<a href="mailto:ijbrewster@alaska.edu" class="">ijbrewster@alaska.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class="">I’m new to matplotlib, and using it in conjunction with Qt as per <a href="https://matplotlib.org/gallery/user_interfaces/embedding_in_qt_sgskip.html" target="_blank" class="">https://matplotlib.org/gallery/user_interfaces/embedding_in_qt_sgskip.html</a>, which works well. However, I’m struggling with borders, especially as the user resizes the window. <div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">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?<br class=""><div class="">
<div dir="auto" style="overflow-wrap: break-word;" class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">---</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">Israel Brewster<br class="">Software Engineer<br class="">Alaska Volcano Observatory <br class="">Geophysical Institute - UAF <br class="">2156 Koyukuk Drive <br class="">Fairbanks AK 99775-7320</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">Work: 907-474-5172<br class="">cell:  907-328-9145</div></div>
</div>
<br class=""></div></div>_______________________________________________<br class="">
Matplotlib-users mailing list<br class="">
<a href="mailto:Matplotlib-users@python.org" target="_blank" class="">Matplotlib-users@python.org</a><br class="">
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank" class="">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br class="">
</blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature">Thomas Caswell<br class=""><a href="mailto:tcaswell@gmail.com" target="_blank" class="">tcaswell@gmail.com</a></div>
</div></blockquote></div><br class=""></div></div></body></html>