[Yt-svn] commit/yt: MatthewTurk: Adding cbar_padding to get_multi_plot and fixing a missed import in the

Bitbucket commits-noreply at bitbucket.org
Wed May 25 21:51:11 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/e82fba36520a/
changeset:   r4290:e82fba36520a
branch:      yt
user:        MatthewTurk
date:        2011-05-26 06:51:04
summary:     Adding cbar_padding to get_multi_plot and fixing a missed import in the
profile_plotter.
affected #:  2 files (105 bytes)

--- a/yt/visualization/plot_collection.py	Wed May 25 19:09:31 2011 -0700
+++ b/yt/visualization/plot_collection.py	Wed May 25 21:51:04 2011 -0700
@@ -1707,7 +1707,8 @@
             canvas = FigureCanvasSVG(plot._figure)
             send_svg_canvas(canvas)
 
-def get_multi_plot(nx, ny, colorbar = 'vertical', bw = 4, dpi=300):
+def get_multi_plot(nx, ny, colorbar = 'vertical', bw = 4, dpi=300,
+                   cbar_padding = 0.4):
     r"""Construct a multiple axes plot object, with or without a colorbar, into
     which multiple plots may be inserted.
 
@@ -1750,11 +1751,11 @@
     if colorbar is None:
         fudge_x = fudge_y = 1.0
     elif colorbar.lower() == 'vertical':
-        fudge_x = nx/(0.25+nx)
+        fudge_x = nx/(cbar_padding+nx)
         fudge_y = 1.0
     elif colorbar.lower() == 'horizontal':
         fudge_x = 1.0
-        fudge_y = ny/(0.40+ny)
+        fudge_y = ny/(cbar_padding+ny)
     fig = figure.Figure((bw*nx/fudge_x, bw*ny/fudge_y), dpi=dpi)
     from _mpl_imports import FigureCanvasAgg
     fig.set_canvas(FigureCanvasAgg(fig))


--- a/yt/visualization/profile_plotter.py	Wed May 25 19:09:31 2011 -0700
+++ b/yt/visualization/profile_plotter.py	Wed May 25 21:51:04 2011 -0700
@@ -38,6 +38,7 @@
     BinnedProfile2D
 from .plot_types import ProfilePlot, PhasePlot
 from .tick_locators import LogLocator
+from yt.utilities.logger import ytLogger as mylog
 
 def invalidate_plot(f):
     @wraps(f)

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list