How to draw multiple constant lines?

111 views (last 30 days)
I want to draw multiple constant lines in a figure. I coded below using xline() and yline() refering Vertical line with constant x-value - MATLAB xline ( But it doesn't work. Would you tell me what is wrong?

Accepted Answer

Cris LaPierre
Cris LaPierre on 29 May 2021
Could you provide more details about what you mean by 'it didn't work'?
xlim([0 5])

More Answers (1)

Yasuyuki Hamanaka
Yasuyuki Hamanaka on 29 May 2021
Edited: Yasuyuki Hamanaka on 29 May 2021
When I code like this
error happen.
Error using xline (line 29)
Passing multiple values to ConstantLine is not supported.
Error in test (line 2)
I am using R2020b now. Should I install R2021a?
Katherine Zheng
Katherine Zheng on 24 Feb 2022
I am using R2021a, but still have this issue. ?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!