フィルターのクリア

Error plotting distribution on top of pcolor

1 回表示 (過去 30 日間)
Madison
Madison 2023 年 7 月 28 日
コメント済み: Madison 2023 年 7 月 29 日
I'm trying to plot distribution data from csv on top of a pcolor plot
close all, clear all clc
% note I've renamed the files, call them what you like but they need to
% have the year in them to load in a loop
fp = 'C:\Users\Madison-Riley\Downloads';
ncdisp(fullfile(fp,'FinalJune2021.nc'))
%look at one file to interrogate and understand dimensions and variables
% test=ncread([filepath,'June2021.nc'],'uo'); whos test
% check all your files, June2019 only had one timestep so I couldn't work with that??
% same for June2020
time = ncread(fullfile(fp,'FinalJune2021.nc'),'time'); whos time
ntime=length(time);
% get coordinate data, assuming it's the same between all files
lon=ncread(fullfile(fp,'FinalJune2021.nc'),'longitude');
lat=ncread(fullfile(fp,'FinalJune2021.nc'),'latitude');
[LON,LAT]=meshgrid(lon,lat);
utide=ncread(fullfile(fp,'FinalJune2021.nc'),'utide'); whos utide
% dimensions lon*lat*depth*time
% https://uk.mathworks.com/help/matlab/ref/ncread.html
% try different depth layers here, why is the land extent so different?
utest=ncread(fullfile(fp,'FinalJune2021.nc'),'utide',[1 1 1 1],[length(lon) length(lat) 1 1]);
vtest=ncread(fullfile(fp,'FinalJune2021.nc'),'vtide',[1 1 1 1],[length(lon) length(lat) 1 1]);
uvtest=sqrt(utest.^2 + vtest.^2);
colormapeditor
close all
pcolor(LON,LAT,uvtest.'), shading flat, colorbar
sid=readtable('SIARC_ND_LatandLon.csv')
C = sid.Longitude
M= sid.Latitude
A=sid.No_Individuals
geoshow(sid.Longitude, sid.Latitude,sid.No_Individuals 'DisplayType', 'Point', 'Marker', 'o', 'Color', 'red');
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
geoscatter(sid.Latitude , sid.Longitude, A)

採用された回答

Voss
Voss 2023 年 7 月 28 日
geoshow(sid.Longitude, sid.Latitude,sid.No_Individuals 'DisplayType', 'Point', 'Marker', 'o', 'Color', 'red');
% ^ missing comma
  3 件のコメント
Voss
Voss 2023 年 7 月 28 日
編集済み: Voss 2023 年 7 月 28 日
You have 'texturemap' and 'Point' as the 'DisplayType'. It can't be both.
Madison
Madison 2023 年 7 月 29 日
Thank you!

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

その他の回答 (0 件)

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by