make grid
4 次查看(过去 30 天)
显示 更早的评论
hello,, i have a problem like this.. i want to make grid (i give its color red) like this picture: http://www.flickr.com/photos/rye_ni/7063578237/
the grid divide the width and height of image.. so, it have 4 areas.. when i press a button, automatically the grid will be show.. how i can make like that.. thank you.. ^^
0 个评论
采纳的回答
Walter Roberson
2012-4-10
xL = get(gca, 'XLim');
yL = get(gca, 'YLim');
xcen = mean(xL);
ycen = mean(yL);
gridlines = line([xcen xcen nan xL], [xL nan ycen ycen], 'Color', [1 0 0]);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Import, Export, and Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!