Stop Grid Lines at specific value?

조회 수: 8 (최근 30일)
Seb H
Seb H 2018년 10월 5일
답변: KSSV 2018년 10월 8일
Hey,
is it possible to stop grid lines at specific values? For example I want grid lines on y axis just to range from x=0 to x=200, but when I plot gca.YTick = 0:0.2:1 the lines reach from x=0 to the end of my plot x=400. Is there a way to stop them at x=200?
Thanks
  댓글 수: 1
Seb H
Seb H 2018년 10월 8일
편집: Seb H 2018년 10월 8일
I want the encircled lines to be removed at x > 200.

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

답변 (1개)

KSSV
KSSV 2018년 10월 8일
Read about xlim and axes. With these you can limit your display range.
Or, you may remove your data and plot. Let x and y be your data.
X = x(x<200) ;
Y = y(x<200) ;
plot(X,Y)

카테고리

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

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by