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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/326216/image.png)
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!