M_pcolor out of memory? (m_map package)

2 views (last 30 days)
Hello everybody.
I am currently using Matlabs M_maps package to plot some p-values on top of each lon/lat gridpoint. Currently i have a vector of 64800 longitude values (180x360), a vector of 64800 latitude values, and a vector of p-values for each gridpoint (values between 0 and 1). I would like to plot this on a global projection on top of m_maps global coastlines. I'm trying to do this using m_pcolor, but when i call the command m_pcolor(data(:,1),data(:,2),p(:,1)), where data(:,1) is longitude values, data(:,2) is latitude values, and p(:,1) is p-values for each [lon,lat] datapoint, it returns OUT OF MEMORY error. How come this is happening?
Here is my code so far:
*
% code
m_proj('hammer','clong',0);
figure('name','1','units','normalized','outerposition',[0.5 0 0.5 1])
%p-values
m_pcolor(data(:,1),data(:,2),p(:,1)); %Out of memory???
m_gshhs_l('color','b','linewidth',0.1);
hold on;
m_grid('xtick',10,'ytick',8,'linewi',1,'tickstyle','dm','tickdir','in','color','r','XAxisLocation','middle','YaxisLocation','left','linewidth',0.2); % Definer gridparametre
hold on;
m_grid('xtick',10,'ytick',8,'linewi',1,'tickstyle','dm','tickdir','in','color','r','XAxisLocation','middle','YaxisLocation','right','linewidth',0.2); % Definer gridparametre
ax=gca;
h = colorbar('location','Eastoutside');
% c.Label.String = 'EWH [cm]';
set(get(h,'ylabel'),'String','p-values', 'FontSize', 10);
colormap gray %Greyscale colormap*
ps: I tried doing this using m_scatter, which worked, but i run into some problems with the scattered bubbles overlapping each other and generally not looking very nice. Especially, when I'm moving more south/north, the bubbles begins overlapping because [lon,lat] points are closer to each other there than at the equator, due to Earths curvature. So I'm looking for a plotting method that is not dependant on the size of the plotting point.

Answers (0)

Community Treasure Hunt

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

Start Hunting!