Hello Daniel,
It is my understanding that you are trying to manually enter the values for mean, box edges and box whiskers for boxplot function. Currently, “boxplot” function does not support the feature for plotting the mean or changing the default quartiles for box edges. But you can change the box whiskers. You may refer the boxplot function to know more about it.
You may also refer the below mentioned workaround to visualize mean of the data.
% initialising data
rng('default')
x1 = rand(5,1);
x2 = rand(10,1);
x3 = rand(15,1);
x = [x1; x2; x3];
g1 = repmat({'First'},5,1);
g2 = repmat({'Second'},10,1);
g3 = repmat({'Third'},15,1);
g = [g1; g2; g3];
% boxplot with median
boxplot(x,g)
hold on
medTags = findall(gcf,'Tag','Median');
set(medTags,'Visible','off');
% boxplot with mean but wihout median
plot(fliplr(vertcat(medTags.XData)'),repmat(mean(x),2,1),'red');
I hope it helps.