comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Over-PLOT() on MAP()?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Over-PLOT() on MAP()? [message #73922 is a reply to message #73921] Sat, 11 December 2010 13:56 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Dec 11, 4:58 pm, Matt Haffner <matt.haff...@gmail.com> wrote:
> I hope I'm missing something obvious, but I can't seem to get this to
> do anything but put symbols at the center of the projection:
>
> IDL> m = map('Hammer')
> IDL> p = plot([190, 230], [25, 35], /over, symbol='o', /sym_filled,
> sym_size=2, /data, sym_color="blue")
>
> Annotations and text go in the right place:
>
> t = text(80, 25, 'Hello', /data)
>
> But PLOT() isn't using the coordinate system at all. Even if the
> projection range is changed via LIMIT, all symbols end up in the
> middle of the new projection.

plot() seems to have inherited the same limitation as iplot with
respect to overplotting on maps:

ttp://groups.google.com/group/comp.lang.idl-pvwave/browse_th read/thread/7dad5b4234801dea

You need to use its map projection to convert the coordinates to
Cartesian:

m=map('sinusoidal')
lats=[60.,30.,0.,-60.,-45.,60.]
lons=[-60.,0.,120.,30.,-60.,-60.]
xy=map_proj_forward(lons,lats,map_structure=m.map_structure)
p=plot(xy,/over,color='red')

Doing that I noticed a bug where my grid lines have a tendency for
disappearing when the map is selected, or something is overplotted, if
the labels are inside the grid (if label_position is larger than 0 and
smaller than 1). Sending the labels to the outside (0 or 1) makes the
problem go away, but in projections like that, also makes for an ugly
plot.

So plot() should be made map-aware like image() and contour() are.
While at it, it should give the option to connect the points with
great circles instead of straight lines.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Butterworth Band-Pass Filter
Next Topic: 3D vector rotation to the Z axis

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 11:39:00 PDT 2025

Total time taken to generate the page: 0.63934 seconds