How to shade an area in a multiple plot figure?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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)
Réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!