make grid

2 Ansichten (letzte 30 Tage)
Rahma Yeni
Rahma Yeni am 10 Apr. 2012
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.. ^^

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 10 Apr. 2012
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]);
  1 Kommentar
Rahma Yeni
Rahma Yeni am 12 Apr. 2012
Thank you Walter.. ^^

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by