Black Lives Matter. Please consider donating to Black Girls Code today.
Learn about the upcoming Dash Enterprise 4.0 release in the August 5th webinar with Chris Parmer, the Inventor of Dash.

Couldn't save MATLAB boxplots to html

I’m generating boxplot using MATLAB, I followed the grouped boxplot scripts in https://plotly.com/matlab/box-plots/. I could successfully generate boxplot on my plotly account however failed to save boxplots to my local drive as html files. Anyone has better ideas to save it as html? Since I’m generating multiple files so I don’t want to use export option in the website. I would like to use plotly command to save boxplots as html files.

Below is my lines in my MATLAB script.

    % Livneh
    trace0 = struct('y',y0,'x',{x0},'name','Historical Baseline','marker',...
        struct('color','#6fbf6e'),'type','box'); % 'boxpoints','all',
    
    % 2030s RCP 4.5 
    trace1 = struct('y',y1,'x',{x},'name','2030s - RCP4.5','marker',...
        struct('color','#5888b0'),'type','box');
    
    % 2030s RCP 8.5
    trace2 = struct('y',y2,'x',{x},'name','2030s - RCP8.5','marker',...
        struct('color','#406482'),'type','box');
    
    % 2070s RCP 4.5
    trace3 = struct('y',y3,'x',{x},'name','2070s - RCP4.5','marker',...
        struct('color','#e94848'),'type','box');
    
    % 2070s RCP 8.5
    trace4 = struct('y',y4,'x',{x},'name','2070s - RCP8.5','marker',...
        struct('color','#ad3434'),'type','box');
    
    % Data for plotly boxplot
    data = {trace0, trace1, trace2, trace3, trace4};
    layout = struct('yaxis',struct('title',title_name,'zeroline',false),'boxmode','group');
    response = plotly(data,struct('layout',layout,'offline',true,'open',true,'strip',false,'fileopt','overwrite'));
    plot_url = response.url;