No colour in bar chart when created offline


#1

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 plot.ly 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.
First:
graphB1 = plotly(data1, struct('layout', layout1,'filename', layout1.title, 'fileopt', 'overwrite'));
Second:
FB1 = plotlyfig; FB1.data = data1; FB1.layout = layout1; FB1.PlotOptions.FileName = filename1; html_1 = plotlyoffline(FB1);

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

All Magnitude Variation: Input Dir - X Opt - 1

. It looks like this:

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