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

Home » Public Forums » archive » map_set problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
map_set problem [message #5813] Fri, 23 February 1996 00:00 Go to next message
sterner is currently offline  sterner
Messages: 106
Registered: February 1991
Senior Member
The following does not work for me for IDL. Version 4.0.1 (hp-ux hp_pa):

map_set,40,52.1,/cont

but map_set,40,52.2,/cont does work ok.

Does this problem occur on other systems besides HP?

By the way, a workaround is adding or subtracting 360 to the
longitude (Longitude must be in range of +/- 360 degrees).

Ray Sterner sterner@tesla.jhuapl.edu
The Johns Hopkins University North latitude 39.16 degrees.
Applied Physics Laboratory West longitude 76.90 degrees.
Laurel, MD 20723-6099
WWW Home page: http://fermi.jhuapl.edu/s1r/people/res/res.html
Re: map_set problem [message #5814 is a reply to message #5813] Fri, 23 February 1996 00:00 Go to previous messageGo to next message
zawodny is currently offline  zawodny
Messages: 121
Registered: August 1992
Senior Member
In article <sterner.825033938@warble.jhuapl.edu> sterner@warble.jhuapl.edu (Ray Sterner) writes:
> The following does not work for me for IDL. Version 4.0.1 (hp-ux hp_pa):
>
> map_set,40,52.1,/cont
>
> but map_set,40,52.2,/cont does work ok.
>
> Does this problem occur on other systems besides HP?

I have the same problem with IDL 4.0 running on a DEC alpha under
Digital UNIX.

Really quite strange, isn't it?

--
Dr. Joseph M. Zawodny KO4LW NASA Langley Research Center
E-mail: J.M.Zawodny@LaRC.NASA.gov MS-475, Hampton VA, 23681-0001
Re: map_set problem [message #6128 is a reply to message #5813] Mon, 22 April 1996 00:00 Go to previous messageGo to next message
Robert Moss is currently offline  Robert Moss
Messages: 74
Registered: February 1996
Member
Gary Fu wrote:
>
> Hello,
>
> I don't know why different font will cause the output of map_set different.
>
> In the following codes, the default font was changed after the first map_set
> and you will find that the two continent outlines do not match.
>
> This will cause problem (different results) if the images are saved from a
> console and from an X terminal with different default font.
>
> Is this a bug or a feature ? Either way, is there a solution on this ?
>
> Thanks.
>
> Gary
>
> ************************************************************ ************
> pro tmp
>
> window, xsize=300, ysize=300
> map_set, 0,0,0, proj=2, /contin, /noborder
> device, font='8x13'
> map_set, 0,0,0, proj=2, /contin, /noborder, color=10, /noerase
>
> end
> ************************************************************ ***********


Well, I tried this on my box (SunOS 4.1.3_U1, IDL 4.0.1c, X11R6, fvwm)
and did not see the problem you describe. The two continental outlines
overlayed perfectly as far as I could see...

Perhaps this is a system or IDL version specific problem...

Robert M. Moss, Ph.D.
Texaco Inc.
mossrm@texaco.com

---------------------------
This does not necessarily reflect the opinions of Texaco Inc.
---------------------------
Re: map_set problem [message #41827 is a reply to message #5813] Wed, 24 November 2004 07:32 Go to previous messageGo to next message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <co1nul$7j3s$1@zam602.zam.kfa-juelich.de>,
Reimar Bauer <R.Bauer@fz-juelich.de> wrote:

> Dear all
>
> please could someone try the following example:
>
>
> The first grid line is not continous it is shifted about one pixel on my
> screeen. Did you see the same behaviour?

Hi Reimar,

I have completely given up on trying to use MAP_GRID to draw grids for
cylindrical projections. I always have problems at the left and right
edge and near the poles.

No amount of whining in this news group has helped. ;-)

The only approach I have found that works is something like the example
below. It is not general, but could be made so.

Ken Bowman



MAP_SET, /CYLINDRICAL, /ISOTROPIC, /CONT, /NOBORDER

xy1 = CONVERT_COORD(-180.0, -90.0, /TO_NORMAL) ;Lower left corner
xy2 = CONVERT_COORD( 180.0, 90.0, /TO_NORMAL) ;Upper right corner
x1 = xy1[0]
x2 = xy2[0]
y1 = xy1[1]
y2 = xy2[1]

nx = 4
dx = (x2 - x1)/nx
FOR i = 0, nx DO PLOTS, x1 + i*[dx, dx], [y1, y2], /NORMAL

ny = 6
dy = (y2 -y1)/ny
FOR j = 0, ny DO PLOTS, [x1, x2], y1 + j*[dy, dy], /NORMAL
Re: map_set problem [message #41828 is a reply to message #5813] Wed, 24 November 2004 05:51 Go to previous messageGo to next message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Reimar Bauer wrote:
> Dear all
>
> please could someone try the following example:
>
>
> The first grid line is not continous it is shifted about one pixel on my
> screeen. Did you see the same behaviour?
>

Yes, I do see this break in the grid line. Had to change COLOR = 1 to see it.
{ ppc darwin unix Mac OS X 6.1 Jul 14 2004 32 32}

The problem (almost) goes away if the HORIZON = 1 keyword is added to you
map_init structure. The correct line is drawn as well as the shifted pixels.


Ben
>
> pro map_bug
> TEK_COLOR
> map_init={$
> color:1,$
> con_color: 3,$
> mlinethick:0,$
> mlinestyle:0,$
> glinethick:0,$
> glinestyle:0,$

>
Re: MAP_SET problem [message #62579 is a reply to message #5813] Sun, 21 September 2008 13:53 Go to previous message
xiao zhang is currently offline  xiao zhang
Messages: 81
Registered: June 2008
Member
On Sep 19, 4:20 pm, Jean H <jghas...@DELTHIS.ucalgary.ANDTHIS.ca>
wrote:
>> noerase,limit=[lon_min,lon_min,lat_max,lon_max],$
>>      charsize = 1.5,COLOR=0
>
> you have a typo, try with:
>
> [lat_min,lon_min,lat_max,lon_max]
>
> Jean

Thank you very much :)
Re: MAP_SET problem [message #62586 is a reply to message #5813] Fri, 19 September 2008 14:20 Go to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
> noerase,limit=[lon_min,lon_min,lat_max,lon_max],$
> charsize = 1.5,COLOR=0
>

you have a typo, try with:

[lat_min,lon_min,lat_max,lon_max]

Jean
Re: MAP_SET problem [message #62587 is a reply to message #5813] Fri, 19 September 2008 13:55 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
xiao writes:

> HI~ guys, I have a problem here. I wrote the following program but the
> map_set command does show the grid lines , why is that?

I'm going to guess because you told it to with the GRID keyword.

Or, do you mean it does NOT show the grid lines? If this is
the case, you usually have to redraw the GRID lines and
continents over again after you display the image. Use
MAP_GRID and MAP_CONTINENTS to do so. (I usually leave
these keywords off the MAP_SET command because they do
absolutely no good if you are going to display an image in
the map.)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: MAP_SET problem [message #62588 is a reply to message #5813] Fri, 19 September 2008 13:54 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
sure we could explain this... but why don't you try to figure it out
for yourself? Just try to run the commands one at a time and observe
their effect. That will go a long way teaching you how to find
problems
in your code.

Cheers,
Paolo

xiao wrote:
> HI~ guys, I have a problem here. I wrote the following program but the
> map_set command does show the grid lines , why is that? Thank you
>
> dimg is a two dimensional array ranging from 0 to 10
>
>
> device, decomposed=0,retain=2
> window,1,xsize=np,ysize=nl+10
> !P.background=FSC_Color('Gray')
> dd=fltarr(np,nl+10,3)
> dd(*,*,*)=255
> tv,dd,true=3
> ;; 0 1 2 3 4 5 6 7 8 9 10 11 12
> r=[255,255,000,204,000,153,102,051,123]
> g=[255,102,102,153,204,102,000,204,157]
> b=[255,153,102,102,102,204,051,204,190]
> tvlct,r,g,b
>
> lat_min=-38.18
> lat_max=-26.82
>
> lon_min=111.85
> lon_max=123.15
>
> Map_set,/continent,/grid,/
> noerase,limit=[lon_min,lon_min,lat_max,lon_max],$
> charsize = 1.5,COLOR=0
>
> TV,dimg,order=1
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Creating DLMs that have IDL code in it
Next Topic: Re: find a plane in a 3D plot

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

Current Time: Wed Oct 08 11:40:32 PDT 2025

Total time taken to generate the page: 0.00765 seconds