Error plotting distribution on top of pcolor

1 次查看(过去 30 天)
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.

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by