No colour in bar chart when created offline


I’ve created a set of bar charts in Matlab and Plotly, with specific colours for each chart and centre bar of each is red. When using the plotly() function that outputs to that is what I get (first image below). However if I try to output offline via plotlyoffline(), all of the bars are black (second image below).
All of the code is the same except for final part that calls the plotly functions.
graphB1 = plotly(data1, struct('layout', layout1,'filename', layout1.title, 'fileopt', 'overwrite'));
FB1 = plotlyfig; = data1; FB1.layout = layout1; FB1.PlotOptions.FileName = filename1; html_1 = plotlyoffline(FB1);

Can anyone explain why the offline graphs ignore the colour marker data?

All Magnitude Variation: Input Dir - X Opt - 1

. It looks like this:

All Magnitude Variation: Input Dir - X Opt - 1_BLACK