[yt-users] Label cut in multiplot

trobolo dinni trobolo.trobolo.dinni5 at gmail.com
Tue Jun 21 18:23:48 PDT 2016


Dear yt users,

I am running the following script:

*from yt.mods import **
*import matplotlib.pyplot as plt*
*import numpy as np*
*import math*
*import os*
*from mpl_toolkits.axes_grid1 import AxesGrid*

*#enable/disables yt output*
*mylog.disabled = True #no yt screen outputs*
*#mylog.disabled = False*

*#SIMULATIONS: this is the P12 but in a bigger box with 512 on a side.*
*root_dir =
"/disks/ceres/makemake/acomp/riaconi/rxi552/Binary-JC_primary-0.6Msun_companion-1_stellar_radii-512grid/"*
*fns =
[root_dir+"DD0014/data0014",root_dir+"DD0030/data0030",root_dir+"DD0041/data0041"]*

*plot_dir = "/disks/ceres/makemake/acomp/riaconi/shared/"*

*#setup for each plot in the figure (grid[i] will point to plot i)*
*#axes_pad is padding between axes in inches*
*fig = plt.figure()*
*grid = AxesGrid(fig, (0.075,0.075,0.85,0.85),*
* nrows_ncols = (1, 3),*
* axes_pad = 0.15,*
* label_mode = "L",*
* share_all = False,*
* cbar_location="right",*
* cbar_mode="single",*
* cbar_size="3%",*
* cbar_pad="0%")*

*for i, fn in enumerate(fns):*
*    pf = load(fn)*
*    common_envelope = pf.h.all_data()*
*    print "|----------|"*
*    print "simulation time: ", pf.current_time, "time code units"*
*    print "|----------|"*

*    s = SlicePlot(pf,'z',fields=["Density"])*
*    plot = s.plots['Density']*

*    plot.figure = fig*
*    plot.axes = grid[i].axes*
*    plot.cax = grid.cbar_axes[i]*
*    s._setup_plots()*

*plt.savefig(plot_dir+'CELMO-Density_difftimes.png')*

However, when I visualise my image or insert it in a latex document the
label on the right results cut off (see attached image).

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.

Cheers,
Roberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160622/352bd5f3/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CELMO-Density_difftimes.png
Type: image/png
Size: 102170 bytes
Desc: not available
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160622/352bd5f3/attachment-0001.png>


More information about the yt-users mailing list