<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Roberto,<div class=""><br class=""></div><div class="">Could you try this:</div><div class=""><br class=""></div><div class="">plt.savefig(plot_dir+'CELMO-Density_difftimes.png', bbox_inches="tight")</div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Best wishes,</div><div class="">--</div><div class="">Suoqing JI</div><div class="">Ph.D Candidate</div><div class="">Department of Physics</div><div class="">University of California, Santa Barbara</div><div class=""><a href="http://web.physics.ucsb.edu/~suoqing" class="">http://web.physics.ucsb.edu/~suoqing</a></div></div></div></div></div></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jun 21, 2016, at 6:23 PM, trobolo dinni <<a href="mailto:trobolo.trobolo.dinni5@gmail.com" class="">trobolo.trobolo.dinni5@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Dear yt users, <div class=""><br class=""></div><div class="">I am running the following script:</div><div class=""><i class=""><br class=""></i></div><div class=""><div class=""><i class="">from yt.mods import *</i></div><div class=""><i class="">import matplotlib.pyplot as plt</i></div><div class=""><i class="">import numpy as np</i></div><div class=""><i class="">import math</i></div><div class=""><i class="">import os</i></div><div class=""><i class="">from mpl_toolkits.axes_grid1 import AxesGrid</i></div><div class=""><i class=""><br class=""></i></div><div class=""><i class="">#enable/disables yt output</i></div><div class=""><i class="">mylog.disabled = True #no yt screen outputs</i></div><div class=""><i class="">#mylog.disabled = False</i></div><div class=""><i class=""><br class=""></i></div><div class=""><i class="">#SIMULATIONS: this is the P12 but in a bigger box with 512 on a side.</i></div><div class=""><i class="">root_dir = "/disks/ceres/makemake/acomp/riaconi/rxi552/Binary-JC_primary-0.6Msun_companion-1_stellar_radii-512grid/"</i></div><div class=""><i class="">fns = [root_dir+"DD0014/data0014",root_dir+"DD0030/data0030",root_dir+"DD0041/data0041"]</i></div><div class=""><i class=""><br class=""></i></div><div class=""><i class="">plot_dir = "/disks/ceres/makemake/acomp/riaconi/shared/"</i></div><div class=""><i class=""><br class=""></i></div><div class=""><i class="">#setup for each plot in the figure (grid[i] will point to plot i)</i></div><div class=""><i class="">#axes_pad is padding between axes in inches</i></div><div class=""><i class="">fig = plt.figure()</i></div><div class=""><i class="">grid = AxesGrid(fig, (0.075,0.075,0.85,0.85),</i></div><div class=""><i class=""><span class="" style="white-space:pre"> </span>nrows_ncols = (1, 3),</i></div><div class=""><i class=""><span class="" style="white-space:pre"> </span>axes_pad = 0.15,</i></div><div class=""><i class=""><span class="" style="white-space:pre"> </span>label_mode = "L",</i></div><div class=""><i class=""><span class="" style="white-space:pre"> </span>share_all = False,</i></div><div class=""><i class=""><span class="" style="white-space:pre"> </span>cbar_location="right",</i></div><div class=""><i class=""><span class="" style="white-space:pre"> </span>cbar_mode="single",</i></div><div class=""><i class=""><span class="" style="white-space:pre"> </span>cbar_size="3%",</i></div><div class=""><i class=""><span class="" style="white-space:pre"> </span>cbar_pad="0%")</i></div><div class=""><i class=""><br class=""></i></div><div class=""><i class="">for i, fn in enumerate(fns):</i></div><div class=""><i class=""> pf = load(fn)</i></div><div class=""><i class=""> common_envelope = pf.h.all_data()</i></div><div class=""><i class=""> print "|----------|"</i></div><div class=""><i class=""> print "simulation time: ", pf.current_time, "time code units"</i></div><div class=""><i class=""> print "|----------|"</i></div><div class=""><i class=""><br class=""></i></div><div class=""><i class=""> s = SlicePlot(pf,'z',fields=["Density"])</i></div><div class=""><i class=""> plot = s.plots['Density']</i></div><div class=""><i class=""><br class=""></i></div><div class=""><i class=""> plot.figure = fig</i></div><div class=""><i class=""> plot.axes = grid[i].axes</i></div><div class=""><i class=""> plot.cax = grid.cbar_axes[i]</i></div><div class=""><i class=""> s._setup_plots()</i></div><div class=""><i class=""><br class=""></i></div><div class=""><i class="">plt.savefig(plot_dir+'CELMO-Density_difftimes.png')</i></div><div class=""><br class=""></div></div><div class="">However, when I visualise my image or insert it in a latex document the label on the right results cut off (see attached image).</div><div class=""><br class=""></div><div class="">I am not able to find a solution for this and I would like to ask if anyone solved this problem before or has any suggestion on how to solve it.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Roberto</div></div>
<span id="cid:A0482457-8120-4B87-929B-30263A7671DD"><CELMO-Density_difftimes.png></span>_______________________________________________<br class="">yt-users mailing list<br class=""><a href="mailto:yt-users@lists.spacepope.org" class="">yt-users@lists.spacepope.org</a><br class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br class=""></div></blockquote></div><br class=""></div></body></html>