Plot data labels with geoplot
조회 수: 18 (최근 30일)
이전 댓글 표시
Hi,
I am plotting a map coloured accordingly to the values of one variable (GDP change), and I would like to have a label with the value of the variable within each region. How can I do that?
My code currently look like this
% Import map
reg_map = readgeotable('src/shape/ita_regions/ita_regions.shp');
% Merge map with data
data_table = array2table(data, 'VariableNames', {var_name});
reg_map_data = [reg_map data_table];
% Plot figure
figure
geoplot(reg_map_data, ColorVariable = var_name)
The outcome looks like this
댓글 수: 0
답변 (1개)
Sai Sumanth Korthiwada
2023년 3월 27일
Hi Lorenzo,
Please use 'legend' to add a label with the value of the variable within each region.
Hope this resolves the query!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Geographic Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!