필터 지우기
필터 지우기

Make lines thinner than the 0.5 setting in R2015b

조회 수: 46 (최근 30일)
Norman Shippee
Norman Shippee 2016년 7월 22일
편집: dpb 2021년 8월 11일
I'm hoping that this might have a simple solution.. I'm plotting a series of polygon line segments using the Mapping Toolbox command geoshow and need them to be very thin (less than 0.5) as there are thousands of individual segments. Currently, the plotting code is:
geoshow(lats,lons,'LineWidth',0.1,'Color','red');
but, upon inspection afterwards, it only plots lines that are actually of LineWidth 0.5. A sample plot of a single year is attached, but keep in mind that there will be an additional 32 years of data being plotted at the same time. Any suggestions?
  댓글 수: 2
dpb
dpb 2016년 7월 23일
See recent similar question...the issue is likely one what the actual resolution can be give pixel spacing. <Line Width>

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

답변 (1개)

Leone Campos
Leone Campos 2021년 8월 10일
I was able to "simulate" a thinner LineWidth behavior using transparency (alpha). You may have problems with rendering, since it forces using opengl render, but you can give it a try.
Original:
coast = shaperead('landareas.shp','UseGeoCoords',true,'RecordNumbers',2);
coast.Geometry
worldmap([-45 80],[-25 195]);
geoshow(coast)
Original
Smaller LineWidth doesn't change anything:
coast = shaperead('landareas.shp','UseGeoCoords',true,'RecordNumbers',2);
coast.Geometry
worldmap([-45 80],[-25 195]);
geoshow(coast,'LineWidth',0.1) % <<---- Modified line
LineWidth=0.1
With EdgeAlpha:
coast = shaperead('landareas.shp','UseGeoCoords',true,'RecordNumbers',2);
coast.Geometry
worldmap([-45 80],[-25 195]);
geoshow(coast,'EdgeAlpha',0.5) % <<---- Modified line
EdgeAlpha=0.5
Even thinner:
coast = shaperead('landareas.shp','UseGeoCoords',true,'RecordNumbers',2);
coast.Geometry
worldmap([-45 80],[-25 195]);
geoshow(coast,'EdgeAlpha',0.25) % <<---- Modified line
EdgeAlpha=0.25
  댓글 수: 1
dpb
dpb 2021년 8월 11일
편집: dpb 2021년 8월 11일
Maybe it's just a fignewton of display, but to me the land mass also looks somewhat washed out in the latter as compared to the first.
Or, maybe it's an optical delusion owing to the reduced contrast of the outline...

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by