필터 지우기
필터 지우기

How to add minor ticks to a graph from the command lines?

조회 수: 10 (최근 30일)
Emerson De Souza
Emerson De Souza 2011년 10월 20일
I want to to add the Minor Ticks from the command line.
Currently, I'm editing the Major Ticks as follows:
set(gca)
set(gca,'XTick',0:1:7)
set(gca,'YTick',-1:0.5:1)
but I did not find any documentation for the minor ticks.
I hope to find someone familiar with this subject.
Thanks in advance for your help
Emerson

채택된 답변

the cyclist
the cyclist 2011년 10월 20일
Is this what you want?
set(gca,'XMinorTick','on')
  댓글 수: 1
Emerson De Souza
Emerson De Souza 2011년 10월 20일
Thank you!
that's exactly what I need. It's apparently simple
but takes long to find the answer when we don't know.
I have a final question with handling graphics:
I want to export a graph but without any background, also NO WHITE. The exported image is expected to be transparent to be placed on the top of another one. Only the axis and the displayed curves are allowed to appear.
I tried to do this writing the following lines:
x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y);
axis([-0.2 7 -1.2 1.2])
set(gca)
set(gca,'Color','none')
print -dmeta -f1 -r600 myfigure %or -dbitmap, -djpeg, -dtiff, -depsc
But unfortunately the exported image always have a white background. I wonder if you know what to correctly write.
I thank you in advance for your attention
Emerson

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by