Make lines thinner than the 0.5 setting in R2015b
42 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
dpb
il 23 Lug 2016
See recent similar question...the issue is likely one what the actual resolution can be give pixel spacing. <Line Width>
Risposte (1)
Leone Campos
il 10 Ago 2021
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/708632/Original.png)
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/708637/LineWidth=0.png)
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/708642/EdgeAlpha=0.png)
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/708647/EdgeAlpha=0.png)
1 Commento
Vedere anche
Categorie
Scopri di più su Contour Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!