Select areas of plot

5 ビュー (過去 30 日間)
daniel alves
daniel alves 2015 年 3 月 18 日
コメント済み: Chad Greene 2015 年 3 月 21 日
I'm working in temperature data in a specific area of the ocean, my plot shows me latitudes that goes from 0 to 300, i need to select specific latitudes, these areas are between latitudes of 0 and 50 and then in the same graph i need to show the latitudes of 250 to 300. Any solutions to exclude the data i don't need in my plot? Thanks
*ps: already tried Xlim, and subplots doesn't solve my problem.
  1 件のコメント
Chad Greene
Chad Greene 2015 年 3 月 21 日
Are you sure you mean latitudes? abs(lat)<=90, with no practical exceptions in oceanography as far as I know. Longitudes, however, may go to 360.

サインインしてコメントする。

回答 (1 件)

Kostas
Kostas 2015 年 3 月 18 日
u can find the latitudes you want to plot and plot just them
id1 = find(lat>=0&lat<=50);
% make the plot
plot(lat(id1),data(id1),'b-');
% find the second area
id2 = find(lat>=250&lat<=300);
% hold the current axes
hold on
% plot second area
plot(lat(id2),data(id2),'b-');

カテゴリ

Help Center および File ExchangeOceanography and Hydrology についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by