make grid

4 visualizaciones (últimos 30 días)
Rahma Yeni
Rahma Yeni el 10 de Abr. de 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.. ^^

Respuesta aceptada

Walter Roberson
Walter Roberson el 10 de Abr. de 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 comentario
Rahma Yeni
Rahma Yeni el 12 de Abr. de 2012
Thank you Walter.. ^^

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Import, Export, and Conversion en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by