how to plot two y axes with different zeros?

조회 수: 2 (최근 30일)
Lilya
Lilya 2020년 5월 13일
댓글: Lilya 2020년 5월 13일
Hi all
I want to have a plot similar to the attached figure.
It should have 2 y-axes, but the right one is shifted in position instead of having it from the original zero
the x-axis is the same.
Could anyone help?
Much appreciated.
  댓글 수: 6
dpb
dpb 2020년 5월 13일
Be a little creative...try
yyaxis right
ylim([-20 20])
yt=yticks;
yticks(yt(yt>=0))
and see what you get...
Lilya
Lilya 2020년 5월 13일
Thanks a bunch!! it works.

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

답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by