Skip to content

Commit 39f4afd

Browse files
fix issue 291
1 parent 5721dc0 commit 39f4afd

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

@@ -425,6 +429,14 @@ function validate(obj)
425429
obj.strip;
426430
end
427431

432+
% strip margins
433+
if obj.PlotOptions.StripMargins
434+
obj.layout.margin.l = 0;
435+
obj.layout.margin.r = 0;
436+
obj.layout.margin.b = 0;
437+
obj.layout.margin.t = 0;
438+
end
439+
428440
% validate keys
429441
validate(obj);
430442

0 commit comments

Comments
 (0)