How to set specific font frame in map axes?

조회 수: 3 (최근 30일)
Ivan Mich
Ivan Mich 2022년 7월 25일
댓글: Ivan Mich 2022년 8월 1일
I would like to create a map with the use of contourf and geoshow commands. The point is that I would like to set a "zebra" (white/black round bounding box around basemap) from into my maps.
I would like to ask , which command should I use in order to make it?
I mean, I would like to create frame axes like in the attached image:
https://www.eoas.ubc.ca/~rich/map.html#13._Blueocean
Could you please help me?
  댓글 수: 3
Benjamin Kraus
Benjamin Kraus 2022년 8월 1일
You are more likely to get help if you can clarify your question a little.
For example:
  • The picture you show doesn't look like a contour map, so how does contourf factor into this question?
  • What have you tried so far? From your description it sounds like all you need to do is add the border to an existing map. What commands are you using to create the picture you have now? Can you share a picture created in MATLAB that shows what you have so far?
  • Are you working with a Mercator projection or some other projection?
There is no command built-in to MATLAB to create the black and white border shown in the picture in your question, so you will have to create it yourself. There are a few different options, but the specifics depend on how you are creating your map to begin with.
Most likely, you will need to use something like polyshape + plot, or patch, or geoplot + a Geospatial Table.
Ivan Mich
Ivan Mich 2022년 8월 1일
I am usinf the following commands:
figure(5)
S=shaperead('C:\Users\hp\Desktop\MY_MAP.shp');
lat_grid2=ltln(:,1);
lon_grid2=ltln(:, 2);
Z=ltln(:, 3);
[lon_si, lat_si] = meshgrid(...
linspace(min(lon_grid2),max(lon_grid2)),...
linspace(min(lat_grid2),max(lat_grid2)));
m_alli = griddata(lon_grid2,lat_grid2,Z, lon_rmsi,lat_rmsi,'natural');
contourf(lon_si,lat_si,m_alli,15,'ShowText','on');
mapshow(S,'Color', 'black','LineWidth',2)
set(gca,'ColorScale','log');
colormap(flipud(jet(5)));
colorbar

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by