can someone lead me how to make such a plot?

Answers (1)

You can make plots like this with the errorbar function. However you'll have to think about the math that's appropriate to define the size of the error bars. Here's an example where I make errorbars using the mean and standard error of the mean
t=readtable('BicycleCounts.csv');
t.Day=categorical(t.Day,["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"]);
t=t(~ismissing(t.Day),:);
tsummary=groupsummary(t,"Day",["mean" "std" "nnz"],"Eastbound");
errorbar(tsummary.Day,tsummary.mean_Eastbound,tsummary.std_Eastbound./sqrt(tsummary.nnz_Eastbound),'LineWidth',1)
xlabel('Day of Week')
ylabel('Average Eastbound Bicycle Counts')

Tags

Asked:

on 5 Nov 2021

Answered:

on 5 Nov 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!