フィルターのクリア

Double y-axis plot. Change properties of second axis

3 ビュー (過去 30 日間)
David du Preez
David du Preez 2017 年 8 月 15 日
回答済み: KL 2017 年 8 月 15 日
I am using MATLAB 2011B. I want to limit the second y-axis between 5 and 10 and I want ticks to occur every 2.5 units.
[ax h1 h2]=plotyy(SZA15_Sort(:,1),SZA15_Sort(:,9),SZA15_Sort(:,1),SZA15_Sort(:,5));
set(h1,'Color','k');
set(h1,'LineStyle',':');
set(h1,'Marker','*','MarkerSize',8)
set(h2,'Color','k');
set(h2,'LineStyle','-');
set(h2,'Marker','.','MarkerSize',8)
axes(ax(1));xlim([datenum(2008,12,13), datenum(2016,1,12)]);
datetick('x','yyyymmm','keeplimits');
axes(ax(2));xlim([datenum(2008,12,13), datenum(2016,1,12)]);
set(ax(2),'xtick',[]);
axes(ax(1));xlabel('Years')
axes(ax(1)); ylabel('Total Ozone Column (DU)');
set(ax(1),'ycolor', 'k');
axes(ax(2)); ylabel('UVI');
set(ax(2),'ycolor','k')
legend('TOC','UVI','Location','southeast')
set(legend,'color','none');
title('TOC vs UVI SZA15')
I tried several things but I understand that using plotty is not ideal. Is there a solution to this problem?

採用された回答

KL
KL 2017 年 8 月 15 日
Just like how you've used xlim, it's ylim
set(ax(2),'ylim',[5 10]);
set(ax(2),'ytick',5:2.5:10);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalendar についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by