flip scatterm plot over world map

I want to overlay a scatterm plot over a world map.
The code is like:
ax = axesm('MapProjection','eqdcylin','MapLatLimit',latlim,'MapLonLimit',lonlim)
ax2 = axesm('MapProjection','eqdcylin','MapLatLimit',latlim,'MapLonLimit',lonlim)
load coastlines;
geoshow(ax,coastlat,coastlon ...);
scatterm(ax2,latcoord,loncoord...);
The problem is that the scatter plot is flipped so i need to flip it back.
But doing
set(ax2,'YDir','reverse');
Flips both the map and the scatter plot.
According to matlab documentation it is probably because only one axesm can be activated at a time.
How can i flip only the scatterm plot?

 Respuesta aceptada

manuel FOSSA
manuel FOSSA el 2 de Dic. de 2016
The solution was simple:
ax = axesm('MapProjection','eqdcylin','MapLatLimit',latlim,'MapLonLimit',lonlim)
load coastlines;
geoshow(ax,coastlat,coastlon ...);
scatterm(ax,fliplr(latcoord),loncoord...);

Más respuestas (1)

KSSV
KSSV el 1 de Dic. de 2016

0 votos

You define two axes like in the link and try to reverse.
Or reverse the data the way you want before plotting.

3 comentarios

manuel FOSSA
manuel FOSSA el 1 de Dic. de 2016
Hello KSSV, The link doesn't work. The cached version has no answer on.
KSSV
KSSV el 1 de Dic. de 2016
The question itself the user used two axis.
manuel FOSSA
manuel FOSSA el 1 de Dic. de 2016
As the user noted, the final solution is not satisfying graphically.

Iniciar sesión para comentar.

Categorías

Más información sobre Geographic Plots en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 1 de Dic. de 2016

Respondida:

el 2 de Dic. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by