Remove graph label in geoplot

조회 수: 26 (최근 30일)
Nur Zawani Rosli
Nur Zawani Rosli 2023년 4월 9일
댓글: Jakub Steiner 2023년 11월 16일
How do I remove the "Latitude" y-axis label on the 4th subplot? It's automatically generated and it's interfering with my other graphs.
  댓글 수: 1
Vilém Frynta
Vilém Frynta 2023년 4월 9일
could you post your code. it would help me get a better insight on what you are doing so i can try it out myself.
what does automatically generated mean?
without the code, i can only say that you could do some magic with set(gca, ...). which will very likely be the right answer.

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

채택된 답변

Vinayak Choyyan
Vinayak Choyyan 2023년 4월 12일
Hi Nur Zawani Rosli,
As per my understanding, you are using ‘geoplot’ to fill in on of the subplots and would like to remove the axis labels for that ‘geoplot’.
The parent object of ‘geoplot’ is ‘GeographicAxes’ and this parent is what contains the properties for the ‘geoplot’ labels. Setting the ‘LatitudeLabel.String’ property to an empty string to remove the label. Please refer to the below code to see an example of the same.
clc;clear;
load usapolygon.mat;
h=geoplot(uslat,uslon);
t=h.Parent;
t.LatitudeLabel.String="";
As seen above, the "Latitude" label has been removed. To know more about ‘GeographicAxes’ properties, please refer to the following documentation https://www.mathworks.com/help/matlab/ref/matlab.graphics.axis.geographicaxes-properties.html.
I hope this resolves the issue you are facing.
  댓글 수: 2
Nur Zawani Rosli
Nur Zawani Rosli 2023년 4월 15일
Yes! Thank you, it works :))
Jakub Steiner
Jakub Steiner 2023년 11월 16일
Thank you for your answer. It helped my as well. Is there a way to remove the cescription of parallels meridians? I mean the 50°N 90°W labels.
Thank you.

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

추가 답변 (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