Skip to content

Commit 4985514

Browse files
authored
Merge pull request #294 from plotly/issue291
fix issue 291
2 parents d663790 + 39f4afd commit 4985514

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

plotly/plotlyfig.m

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
obj.PlotOptions.OpenURL = true;
5959
obj.PlotOptions.Strip = false;
6060
obj.PlotOptions.Visible = 'on';
61-
obj.PlotOptions.TriangulatePatch = false;
61+
obj.PlotOptions.TriangulatePatch = false;
62+
obj.PlotOptions.StripMargins = false;
6263

6364
% offline options
6465
obj.PlotOptions.Offline = true;
@@ -192,6 +193,9 @@
192193
if(strcmpi(varargin{a},'data'))
193194
obj.data = varargin{a+1};
194195
end
196+
if(strcmpi(varargin{a},'StripMargins'))
197+
obj.PlotOptions.StripMargins = varargin{a+1};
198+
end
195199
end
196200
end
197201

@@ -423,6 +427,14 @@ function validate(obj)
423427
obj.strip;
424428
end
425429

430+
% strip margins
431+
if obj.PlotOptions.StripMargins
432+
obj.layout.margin.l = 0;
433+
obj.layout.margin.r = 0;
434+
obj.layout.margin.b = 0;
435+
obj.layout.margin.t = 0;
436+
end
437+
426438
% validate keys
427439
validate(obj);
428440

0 commit comments

Comments
 (0)