Geodensityplot help in matlab

3 visualizaciones (últimos 30 días)
Liam Lincoln
Liam Lincoln el 15 de Mzo. de 2021
Respondida: Avni Agrawal el 14 de Mayo de 2024
Hi,
New here. Trying to do a densityplot of the UK but keep running into problems.
using:
Data = readtable('Work11.xlsx');
figure
latAll = Work11.latitude;
lonAll = Work11.longitude;
weight = Work11.Normalized
geobubble(latAll,lonAll,weight,'FaceColor','interp')
I get:
The problem is, well, the big blue regtangle. I am sure this has to do with Amin min and max, but any attempt to adjust these values causes errors in the results.
Any ideas?
Thanks

Respuestas (1)

Avni Agrawal
Avni Agrawal el 14 de Mayo de 2024
I understand that you are trying to create a density plot for the UK using geographical data with `geobubble` in MATLAB. Ensure you are accessing your table data correctly and using `geobubble`'s functions properly.
Here’s how you can adjust your code:
% Load data from Excel file
Data = readtable('Work11.xlsx');
% Extract columns for latitude, longitude, and weight
latAll = Data.latitude;
lonAll = Data.longitude;
weight = Data.Normalized;
% Create a geobubble plot
figure;
geobubble(latAll, lonAll, weight);
title('Density Plot of the UK');
Ensure your latitude and longitude data are accurate and within the UK's geographic bounds. If you encounter a big blue rectangle, it might be due to outliers or incorrect data ranges. Use `geolimits` to focus the map on the UK:
geolimits([49 61], [-8 2]); % Adjust as necessary
I hope this helps!

Categorías

Más información sobre Geographic Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by