m_map and GNU Octave for map projection aka sphere mapping

Eric Chassande-Mottin echassandemottin at gmail.com
Tue Feb 19 12:11:14 CST 2008


[resent because of an oversized attachment]


I have tried to use the package m_map to make
 map projection which you can get here:
 http://www.eos.ubc.ca/~rich/map.html
 See the site to get an idea of the types
 of available mappings. Those include Mollweide
 which I wanted.

 I have tested some of the
 demos scripts and the package works
 pretty much "out of the box" with octave 3.0
 and gnuplot 4.2. I give below a script that generates
 the Mollweide map of some function.
 the resulting plot looks good but it would be useful that
 "educated" users checks that it indeed makes
 sense.

 as far as I have seen, map projection is a missing
 feature of GNU Octave. so this is good news.

 eric.

 ===============================

 addpath("private");  # access private functions

 clear;

 N=128;

 Plat=linspace(-90,90,N);
 Plon=linspace(-180,180,N);
 [Plg,Plt]=meshgrid(Plat,Plon);
 m_proj('mollweide','longitude',[-180 180]);

 P=sin(2*pi/180*Plg).*cos(2*pi/180*Plt);

 clf;
 m_pcolor(Plg,Plt,P);
 shading("flat");
 colorbar("SouthOutside");
 axis("off");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo.png
Type: image/png
Size: 16087 bytes
Desc: not available
Url : https://www.cae.wisc.edu/pipermail/help-octave/attachments/20080219/444637dd/attachment.png 


More information about the Help-octave mailing list