Shading the area between curves

2 views (last 30 days)
Giordano Lewis
Giordano Lewis on 27 Apr 2019
Answered: darova on 27 Apr 2019
Hello,
I've reproduced a plot for my university dissertation, and I need to know how to fill it. I've attached an image of what I'm trying to do. The area between the curves a more transparent colour than a standard block colour.
This is the code I've used:
plot(chain2018_09,ele2018_09,'color',[0 0.4470 0.7410],'linewidth',1.25)
hold on
plot(chain2014_09,ele2014_09,'color',[0.4660 0.6740 0.1880],'linewidth',1.25)
plot(chain2011_09,ele2011_09,'color',[0.8500 0.3250 0.0980],'linewidth',1.25)
title('6b00009')
grid on
xlabel ('Chainage (m)')
ylabel ('Elevation (m)')
axis([-250 400 -3 7])
xticks(-250:50:400);
yticks(-3:1:7);
I'm not an expert really, I'm using matlab to produce high quality plots for my dissertation. So apologies if its a bit long winded.
I hope anyone can help.

Answers (1)

darova
darova on 27 Apr 2019
What about fill() ?
Look HERE and HERE

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!