diff --git a/plotly/plotly_offline_aux/plotlyoffline.m b/plotly/plotly_offline_aux/plotlyoffline.m index 21444a10..b0b8a64c 100644 --- a/plotly/plotly_offline_aux/plotlyoffline.m +++ b/plotly/plotly_offline_aux/plotlyoffline.m @@ -14,10 +14,15 @@ % check that the bundle exists try - bundle = fileread(bundleFile); + % ----- js CDN url ----- + jsChina = 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/plotly.js/1.58.5/plotly.min.js'; + jsGlobal = 'https://cdn.jsdelivr.net/npm/plotly.js@1.58.5/dist/plotly.min.js'; % template dependencies - depScript = sprintf('\n', ... - bundle); + depScript = sprintf(['\n\n', ... + '\n\n', ... + '\n\n', ... + '\n\n'], ... + bundleFile, jsChina, jsGlobal); catch error(['Error reading: %s.\nPlease download the required ', ... 'dependencies using: >>getplotlyoffline \n', ...