Reputation: 27
I would like to draw in grey color a certain part of the background in a plot. I know how to change the background color of the whole plot.I used this code after the plot function:
HANDLE = gca
get( HANDLE );
set( HANDLE, 'Color', [0.7,0.7,0.7] )
Exemple: y=x^2
How can I do to draw the blue part of the background in grey and to leave the other parts in white?
Thank you in advance
Upvotes: 0
Views: 1848
Reputation: 2449
You can always draw a filled 2D rectangle with the desired color:
rectangle('Position',[-5,400,10,400],'FaceColor',[0.7,0.7,0.7])
So:
Upvotes: 1