Range limits with plot background color
显示 更早的评论
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.
采纳的回答
更多回答(1 个)
Shashank Prasanna
2013-2-5
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 个评论
Stan Kruger
2015-10-23
编辑:Stan Kruger
2015-10-23

Works great, thanks for clear answer!
Inesteroide
2018-10-23
Can you please share the code?
类别
在 帮助中心 和 File Exchange 中查找有关 Graphics Performance 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!