필터 지우기
필터 지우기

How do I hold the current plot but not the axis properties?

조회 수: 2 (최근 30일)
Erik  Langholz
Erik Langholz 2015년 7월 9일
댓글: Erik Langholz 2015년 7월 13일
I'm creating a GUI that can plot multiple functions on the same plot, depending on which data-set I choose. If I use hold on, the axis on the plot doesn't change and the next data-set might not be completely displayed. I want to keep the current data on the plot but have another data-set plotted and have the axis scale so that both sets can be seen.

답변 (1개)

Matthew
Matthew 2015년 7월 9일
Check to make sure that your axes XLimMode and YLimMode is set to auto.
figure;plot(1:10)
hold on;
plot(1:10:100)
plot(1:.1:10)
seems to work fine, so your issue may not really be with the hold command.
  댓글 수: 1
Erik  Langholz
Erik Langholz 2015년 7월 13일
Yup, that works. I'm having trouble with using a polar plot.
figure;
polar(1:10)
hold on;
polar(1:10:100)
This runs into the same problem I'm having. If I use axis auto, the polar(1:10:100) fits in the plot but the axis doesn't scale properly.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by