Eliminating vertical lines where graph jumps

조회 수: 3 (최근 30일)
Frank Lad
Frank Lad 2018년 11월 25일
댓글: Walter Roberson 2018년 11월 26일
I am graphing several functions over the same domain, each of which equals zero over different subdomains. The display shows vertical lines where each function jumps from zero to the non-zero values. Is there any way to erase these vertical connections on the graphs? Is there an eraser tool?

답변 (1개)

Image Analyst
Image Analyst 2018년 11월 25일
You can insert a new element into your data that has a value NAN. Lines do not go through nan elements. I don't know how to do it after it's been plotted but you can do it before you plot.
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 11월 26일
If you want a display that looks something like
+++++
+++++++ ++++++
but you are using stairs() and so are currently getting something like
+++++
+ +
+++++++ ++++++
then you would either need to change away from using stairs() or you would have to insert two nans and use redundant t values, such as
[1 7 7 7 11 11 11 16], [0 0 nan 1 1 nan 0 0]

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

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by