필터 지우기
필터 지우기

spy with grid

조회 수: 6 (최근 30일)
Chienmin
Chienmin 2012년 4월 27일
Does any one know how to addgrid when using spy() function? I tried to put 'grid on', but it failed. However, if I add 'grid minor', then it worked; but I dont want the minor grids to be diaplayed.

채택된 답변

Chienmin
Chienmin 2012년 4월 27일
Many thanks.
  댓글 수: 3
Chienmin
Chienmin 2012년 4월 27일
I tried to vote it. But it shows: You can't vote for an answer that you created. Sorry, mate. But thanks again.
Daniel Shub
Daniel Shub 2012년 4월 27일
But you can vote for and accept answers that are not yours.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Daniel Shub
Daniel Shub 2012년 4월 27일
The key can be found with
type spy
You will see
set(gca,'xlim',[0 n+1],'ylim',[0 m+1],'ydir','reverse', ...
'GridLineStyle','none','plotboxaspectratio',[n+1 m+1 1]);
Setting the GridLineStyle property to none seems a likely source of the "problem". You can get around it with:
spy
grid on
set(gca, 'GridLineStyle', ':')

카테고리

Help CenterFile Exchange에서 Sparse Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by