bound = [.2 .1 .5 .7];
x = .3:.1:.6;
y = .2:.1:.7;
cla()
xlim([0,1])
ylim([0,1])
hold on
rectangle('position', bound, 'EdgeColor','r')
vh = plot([x(:),x(:)],[bound(2),sum(bound([2,4]))], 'Color', [.6,.6,.6]);
hh = plot([bound(1),sum(bound([1,3]))],[y(:),y(:)], 'Color', [.6,.6,.6])
2 Comments
darova (view profile)
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/476831-how-to-insert-grid-lines-specific-position#comment_737103
Adam Danz (view profile)
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/476831-how-to-insert-grid-lines-specific-position#comment_737314
Sign in to comment.