Hatchfill certain area under curve: findobj
Mostra commenti meno recenti
Hi,
I was wondering how to get the area left to the line where the mean is hatched in color using hatchfill2 function:
x = [-3:.1:3];
norm = normpdf(x,0,1);
figure;
plot(x,norm)
y1 = get(gca,'ylim');
hold on
plot([mean(norm) mean(norm)],y1)
Thanks in advance!
Risposta accettata
Più risposte (1)
peterhack
il 19 Giu 2016
0 voti
1 Commento
Walter Roberson
il 19 Giu 2016
patch objects have CData and FaceVertexCData properties. The two affect coloring in different ways, with the vertex based one being more powerful in some ways.
The output of hatchfill is line objects, which do have a Color property.
Categorie
Scopri di più su Array Geometries and Analysis in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!