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

Home » Public Forums » archive » map_set doesn't return a map
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 doesn't return a map [message #91310] Mon, 29 June 2015 08:36 Go to next message
wdolan is currently offline  wdolan
Messages: 29
Registered: June 2015
Junior Member
Warning: new IDL user here. I'm trying to plot points on a map. I've got a lat variable, and a long variable.

In the command line window I type:

lat=btstruc.latitude
lon=btstruc.longitude
map_set
map_continents
oplot, lon, lat

I get no error messages, but no map pops up at all. I'm not sure why this is! Any advice?
Re: map_set doesn't return a map [message #91311 is a reply to message #91310] Mon, 29 June 2015 08:39 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
wdolan@oxy.edu writes:

> Warning: new IDL user here. I'm trying to plot points on a map. I've got a lat variable, and a long variable.
>
> In the command line window I type:
>
> lat=btstruc.latitude
> lon=btstruc.longitude
> map_set
> map_continents
> oplot, lon, lat
>
> I get no error messages, but no map pops up at all. I'm not sure why this is! Any advice?

What does HELP, /DEVICE tell you?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: map_set doesn't return a map [message #91327 is a reply to message #91311] Mon, 29 June 2015 13:19 Go to previous messageGo to next message
wdolan is currently offline  wdolan
Messages: 29
Registered: June 2015
Junior Member
Also the map_set works when I haven't run the program I wrote, but once I run the program, and then do map_set, nothing comes up. This leads me to think that the ps file I set up in the program isn't closing (even though at the end of the program I say device, /close

When I type help, /device after running the program I get this:
Available Graphics Device, CGM HP LJ NULL PCL PRINTER PS REGIS TEK X Z
Current graphics device: PS

and it continues for a while

but the map isn't printing to that .ps file that I set up either (its not there if I open the file in GIMP)

Thanks,

Wayana

On Monday, June 29, 2015 at 8:39:31 AM UTC-7, David Fanning wrote:
> wdolan@oxy.edu writes:
>
>> Warning: new IDL user here. I'm trying to plot points on a map. I've got a lat variable, and a long variable.
>>
>> In the command line window I type:
>>
>> lat=btstruc.latitude
>> lon=btstruc.longitude
>> map_set
>> map_continents
>> oplot, lon, lat
>>
>> I get no error messages, but no map pops up at all. I'm not sure why this is! Any advice?
>
> What does HELP, /DEVICE tell you?
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: map_set doesn't return a map [message #91328 is a reply to message #91327] Mon, 29 June 2015 13:40 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
wdolan@oxy.edu writes:

> Also the map_set works when I haven't run the program I wrote, but once I run the program, and then do map_set, nothing comes up. This leads me to think that the ps file I set up in the program isn't closing (even though at the end of the program I say device, /close
>
> When I type help, /device after running the program I get this:
> Available Graphics Device, CGM HP LJ NULL PCL PRINTER PS REGIS TEK X Z
> Current graphics device: PS
>
> and it continues for a while
>
> but the map isn't printing to that .ps file that I set up either (its not there if I open the file in GIMP)

Yes, you are getting a little confused. :-)

It is not enough to simply close the PostScript file, you must also
switch back to your normal graphics device (X, in your case), if you
want to create graphics windows with plots and maps in them.

The normal sequence of commands looks something like this:

thisDevice = !D.Name
Set_Plot, 'PS'
Device, ... ; Configure PostScript Device
.... whatever graphics commands you use go here....
Device, /Close
Set_Plot, thisDevice

In this way, you will be set up to do "normal" IDL graphics again.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: map_set doesn't return a map [message #91329 is a reply to message #91328] Mon, 29 June 2015 13:47 Go to previous message
wdolan is currently offline  wdolan
Messages: 29
Registered: June 2015
Junior Member
Great, thank you, it works! The only line of code I was missing was the Set_Plot, thisDevice.


On Monday, June 29, 2015 at 1:40:59 PM UTC-7, David Fanning wrote:
> wdolan@oxy.edu writes:
>
>> Also the map_set works when I haven't run the program I wrote, but once I run the program, and then do map_set, nothing comes up. This leads me to think that the ps file I set up in the program isn't closing (even though at the end of the program I say device, /close
>>
>> When I type help, /device after running the program I get this:
>> Available Graphics Device, CGM HP LJ NULL PCL PRINTER PS REGIS TEK X Z
>> Current graphics device: PS
>>
>> and it continues for a while
>>
>> but the map isn't printing to that .ps file that I set up either (its not there if I open the file in GIMP)
>
> Yes, you are getting a little confused. :-)
>
> It is not enough to simply close the PostScript file, you must also
> switch back to your normal graphics device (X, in your case), if you
> want to create graphics windows with plots and maps in them.
>
> The normal sequence of commands looks something like this:
>
> thisDevice = !D.Name
> Set_Plot, 'PS'
> Device, ... ; Configure PostScript Device
> .... whatever graphics commands you use go here....
> Device, /Close
> Set_Plot, thisDevice
>
> In this way, you will be set up to do "normal" IDL graphics again.
>
> Cheers,
>
> David
>
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: READF: Input conversion error. Unit: 103,
Next Topic: end of file in the middle of a text file

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

Current Time: Wed Oct 08 09:10:32 PDT 2025

Total time taken to generate the page: 0.00444 seconds