Stop Grid Lines at specific value?

3 Ansichten (letzte 30 Tage)
Seb H
Seb H am 5 Okt. 2018
Beantwortet: KSSV am 8 Okt. 2018
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 Kommentar
Seb H
Seb H am 8 Okt. 2018
Bearbeitet: Seb H am 8 Okt. 2018
I want the encircled lines to be removed at x > 200.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

KSSV
KSSV am 8 Okt. 2018
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)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by