필터 지우기
필터 지우기

Any knows why a second line appears in the bottom x-axis?

조회 수: 1 (최근 30일)
Mac
Mac 2023년 9월 8일
댓글: Mac 2023년 9월 13일
I use this line to save (exportgraphics(fig,'RossbyFig3d.jpg','Resolution', 600)). If I use .pdf the line does not appear. By the way, I added a right axis y ticks using:
axis xy
rightytick = [190 230 290 330 350 385];
rightytick = flip(rightytick);
h2 = axes('Position', h1.Position, 'Color', 'none', 'YLim', h1.YLim, 'XLim', h1.XLim, 'XTick', [], ...
'YAxisLocation', 'right','YTick', ((1./rightytick)./86400).*1e8, 'YTickLabel', sprintf('%.0f\n', rightytick), ...
'FontSize', 10);
ylabel('Period (days)')
Do you think above caused the problem? Thank you for the help. Appreciate a lot.
  댓글 수: 1
Mac
Mac 2023년 9월 8일
Update:
I tried running the script without the code to plot the right y axis ticks, and the second line in the bottom x-axis is removed. Anyone knows a better way to add a right y-axis? Thanks a lot.

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

채택된 답변

Dyuman Joshi
Dyuman Joshi 2023년 9월 8일
"Anyone knows a better way to add a right y-axis?"
Try yyaxis

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by