Symbolspec Lines with geoshow
조회 수: 7 (최근 30일)
이전 댓글 표시
Hey,
I'm plotting latitude and longitude data to receive the flight routes. Now I want to color the routes/lines by airline(callsign), so I can see which airline is flying where. Therefore I'm using SymbolSpec. Besides the latitudedegrees and longitudedegree is a column in the table (LnL_Po1) with their callsign, shortened to the airline code.
LineColor = makesymbolspec('Line',{'callsign','UAL', 'Color',[11/256 84/256 229/256]},{'callsign', 'AAL', 'Color', [224/256 6/256 6/256]},{'callsign','DAL','Color',[196/256 0/256 107/256]},{'Default','Color','k'});
geoshow(LnL_Po1.latitudedegrees, LnL_Po1.longitudedegrees,'Line', 'SymbolSpec', LineColor);
Using this code I received following Error Message: The parameter/value inputs must be pairs. I tried to fix it by myself, but couldn't find a solution. Any Suggestions what could be wrong? Thanks in advance!
댓글 수: 2
Jyotish Robin
2018년 2월 27일
In the geoshow command, I don't see a name corresponding to the value 'Line'. You may be probably missing the name 'DisplayType' which needs to be used along with the value 'Line'.
답변 (1개)
Jyotish Robin
2018년 3월 1일
Hi Philipp,
The geoshow(lat,lon,...) syntax doesn’t work with symbol specs – so geoshow simply passes the SymbolSpec name-value pair to line, which doesn’t know what do so with it.
In order to use a symbol spec, replace lat, lon with S, where S is a geopoint vector, a geoshape vector, or a geostruct (with 'Lat' and 'Lon' coordinate fields).
You can find more info about the stucture of S at https://www.mathworks.com/help/map/ref/geoshow.html
Hope this helps!
Thanks,
Jyotish
참고 항목
카테고리
Help Center 및 File Exchange에서 C Shared Library Integration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!