필터 지우기
필터 지우기

yyaxis want to zoom only yyaxis right

조회 수: 13 (최근 30일)
Brent
Brent 2022년 11월 26일
댓글: Suvansh Arora 2022년 11월 29일
Generating a graph (code below) with yyaxis left and yyaxis right. I use the scroll wheel on my mouse to zoom and/or select regions. I'd like the zoom to affect x and yyaxis left but not yyaxis right.
Any ideas on how to accomplish that?
figure('Name', append(parts, " Normalized by Minute"));
zoom on;
yyaxis left; % different scaling e.g., Sum Gain
nnLRplus.C.sum_gain(nnLRplus.C.sum_gain == 0) = NaN;
plot(nnLRplus.C.sum_xAxis,nnLRplus.C.sum_gain,'-*b', 'LineWidth', 1);
yyaxis right; % all these values are normalized within -1 -- +1
h = plot(tsByMinutes,selectedNormalizedRows, nnLRplus.C.pred_xAxis, nnLRplus.C.pred_gain, 'LineWidth', 2); %
ylim([-5 5]);
yline(0);
legend([cellstr(nnLRplus.C.sum_label), selectedNames, cellstr(nnLRplus.C.pred_label), 'zero line']);
  댓글 수: 1
Suvansh Arora
Suvansh Arora 2022년 11월 29일
In order to understand this better, could you please attach the ".MAT" and ".m" file?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by