Please help, I keep getting this error... Error using plot Not enough input arguments.
3 views (last 30 days)
Show older comments
Months=["Jan";"Feb";"March";"April";"May";"June";"July";"Aug";"Sept";"Oct";"Nov";"Dec"];
EnergyDailyAve = [33.677 76.714 69.677 64.800 49.871 59.533 49.290 45.516 31.033 29.258 44.233 23.419]';
xticklabels(Months)
plot(Months,EnergyDailyAve)
0 Comments
Answers (2)
KSSV
on 22 Feb 2023
Months=["Jan";"Feb";"March";"April";"May";"June";"July";"Aug";"Sept";"Oct";"Nov";"Dec"];
EnergyDailyAve = [33.677 76.714 69.677 64.800 49.871 59.533 49.290 45.516 31.033 29.258 44.233 23.419]';
plot(EnergyDailyAve)
xticklabels(Months)
4 Comments
KSSV
on 22 Feb 2023
Months=["Jan";"Feb";"March";"April";"May";"June";"July";"Aug";"Sept";"Oct";"Nov";"Dec"];
EnergyDailyAve = [33.677 76.714 69.677 64.800 49.871 59.533 49.290 45.516 31.033 29.258 44.233 23.419]';
plot(EnergyDailyAve)
% xticklabels(Months)
set(gca,'XTickLabel',Months),set(gca,'XTick',1:numel(Months))
Stephen23
on 22 Feb 2023
Rather than fiddling around with text and tickmarks, let MATLAB do it for you:
V = [33.677;76.714;69.677;64.800;49.871;59.533;49.290;45.516;31.033;29.258;44.233;23.419];
D = datetime(2023,1,1):calmonths(1):datetime(2023,12,31);
plot(D,V)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!