Problems with wrapTo180, creates lines on map
Mostrar comentarios más antiguos
Hello,
I have a longitude vector that I want to convert from 0-360 to -180 - 180 The data shows perfectly find on a global map when in its original 360 form, but once I use wrapTo180, there seems to be lines all across my global map.
Has anyone else had this problem?
If so, how do I fix it?
Thank you,
Melissa
3 comentarios
Chad Greene
el 12 de Feb. de 2015
Can you upload an image with lines? Can you repeat the problem using dummy data such as Z=peaks(180)? If so, upload some code that we can use to replicate the problem.
Melissa
el 7 de Mzo. de 2015
Brian DeCicco
el 27 de Jul. de 2021
Melissa, I'm having the same issue as you are here. Did you ever get resolution to this?
Respuestas (1)
Rob Comer
el 23 de Feb. de 2015
0 votos
Instead of wrapping your longitudes, try using the maptriml function with latlim = [-90 90] and lonlim = [-180 180]. Because these limits span the globe, this won't really trim away any data. What it will do is cut your data on the 180-degree meridian. This cut should eliminate the spurious lines that you're seeing across your global map.
1 comentario
Melissa
el 7 de Mzo. de 2015
Categorías
Más información sobre Lengths and Angles en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!