Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
Mac
Mac am 8 Sep. 2023
Kommentiert: Mac am 13 Sep. 2023
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 Kommentar
Mac
Mac am 8 Sep. 2023
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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Dyuman Joshi
Dyuman Joshi am 8 Sep. 2023
"Anyone knows a better way to add a right y-axis?"
Try yyaxis

Weitere Antworten (0)

Kategorien

Mehr zu Printing and Saving finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by