From 681d55a00ee357bf931281305809548c6c0f7a4b Mon Sep 17 00:00:00 2001 From: imatlab-helper Date: Sun, 5 Mar 2017 01:49:01 -0800 Subject: [PATCH] check OpenURL before launching browser in offline mode This check is necessary otherwise when parameters 'offline':true and 'open':false are passed to fig2plotly, plotly still tries to open up the browser. --- plotly/plotlyfig.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plotly/plotlyfig.m b/plotly/plotlyfig.m index 8f00c413..451b356b 100644 --- a/plotly/plotlyfig.m +++ b/plotly/plotlyfig.m @@ -443,7 +443,9 @@ function validate(obj) end else obj.url = plotlyoffline(obj); - web(obj.url, '-browser'); + if obj.PlotOptions.OpenURL + web(obj.url, '-browser'); + end end end