From e6a76b7b85468c7d996ba7244a0d13f6a3b6133a Mon Sep 17 00:00:00 2001 From: philippjfr Date: Fri, 22 May 2015 14:55:50 +0100 Subject: [PATCH] Replaced Layout.apply_aspect with aspect_weight parameter --- holoviews/plotting/plot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/holoviews/plotting/plot.py b/holoviews/plotting/plot.py index a5d3874fbd..a93797095a 100644 --- a/holoviews/plotting/plot.py +++ b/holoviews/plotting/plot.py @@ -901,10 +901,9 @@ class LayoutPlot(CompositePlot): displays the elements in a cartesian grid in scanline order. """ - apply_aspects = param.Boolean(default=True, doc=""" - If applied and any of the Layout elements have explicit - aspects set subplot proportions will be computed to - respect the aspects.""") + aspect_weight = param.Number(default=1, doc=""" + Weighting of the individual aspects when computing the Layout + grid aspects and overall figure size.""") fig_bounds = param.NumericTuple(default=(0.05, 0.05, 0.95, 0.95), doc=""" The bounds of the figure as a 4-tuple of the form @@ -979,8 +978,9 @@ def _compute_gridspec(self, layout): main = layout_view.main main = main.last if isinstance(main, HoloMap) else main main_options = Store.lookup_options(main, 'plot').options if main else {} - if main and self.apply_aspects and not isinstance(main_options.get('aspect', 1), basestring): + if main and not isinstance(main_options.get('aspect', 1), basestring): main_aspect = main_options.get('aspect', 1) + main_aspect = self.aspect_weight*main_aspect + 1-self.aspect_weight else: main_aspect = 1 if layout_type == 'Triple':