How to shade an area in a multiple plot figure?

1 次查看(过去 30 天)
I am using "addaxis" package to plot more than 2 sets of data of varying magnitudes in a single plot and i want one of the areas under the curve to be shaded/filled. How can i do that? Is there another way to do this? Here is what ive tried currently:
figure
plot(pems_31(:,1),pems_31(:,18),'b','linewidth',1)
addaxis(pems_31(:,1),pems_31(:,12),'r','linewidth',1)
addaxis(pems_31(:,1),pems_31(:,22),[0 120],'k','linewidth',1)
fill(pems_31(:,1),pems_31(:,22),'g')
xlabel('\bf Time rural [s]')
addaxislabel(2,'PN ')
addaxislabel(1,'\bf Engine Speed [RPM]')
addaxislabel(3,'\bf Velocity [km/h]')
example plot i need:

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by