Range limits with plot background color
Afficher commentaires plus anciens
Hello Forum, I am trying to set the plot background of a series of plots to be white and for y-axis values above 60 grey. Is there a way to do this? I am trying to highlight values above a certain criteria. Other suggestions are welcome. Thanks.
Réponse acceptée
Plus de réponses (1)
Shashank Prasanna
le 5 Fév 2013
clf
plot(rand(10,1),'-o')
yUp = 0.7;
x=get(gca,'XLim');
y=get(gca,'YLim');
patch('XData',[x fliplr(x)],'YData',[yUp yUp y(2) y(2)],'FaceColor','r','FaceAlpha',0.3)
2 commentaires
Stan Kruger
le 23 Oct 2015
Modifié(e) : Stan Kruger
le 23 Oct 2015

Works great, thanks for clear answer!
Inesteroide
le 23 Oct 2018
Can you please share the code?
Catégories
En savoir plus sur Graphics Performance dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!