Yet Another IDL 8.2.3 Anomoly with Window Refresh [message #84914] |
Tue, 18 June 2013 10:04  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
I have some function graphics code that produces a box axes on a map.
Because this involves a lot of "after the fact" manipulation, I usually
turn window refreshing off so the user doesn't have to see all the
machinations. But, the window refresh has seemingly gone South in IDL
8.2.3.
Here is an example program. It works perfectly until you set the REFRESH
keyword. Then, you just see a big cross in the graphics window. :-(
;***********************************************
PRO Window_Refresh_Bug, Refresh=refresh
win = Window()
IF Keyword_Set(refresh) THEN win.refresh, /Disable
mp = Map('Equirectangular', CENTER_LONGITUDE=180, $
BOX_AXES=1, GRID_LATITUDE = 30, GRID_LONGITUDE = 45, $
LABEL_POSITION=0, LIMIT=[-89.99, 0, 89.99, 360], CURRENT=win)
mp['Latitudes'].label_angle=90
mp['Longitudes'].label_angle=0
grid = MapGrid( $
LONGITUDE_MIN=0, LONGITUDE_MAX=360, $
LATITUDE_MIN=-90, LATITUDE_MAX=90, $
GRID_LONGITUDE=45, GRID_LATITUDE=30, $
LABEL_POSITION=1, CURRENT=win)
FOREACH g,grid.latitudes DO g.label_angle=270
FOREACH g,grid.longitudes DO g.label_angle=0
c = MapContinents(Color=!Color.red)
IF Keyword_Set(refresh) THEN win.refresh
END
;***********************************************
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: Yet Another IDL 8.2.3 Anomoly with Window Refresh [message #84919 is a reply to message #84914] |
Tue, 18 June 2013 11:32   |
lecacheux.alain
Messages: 325 Registered: January 2008
|
Senior Member |
|
|
Le mardi 18 juin 2013 19:04:51 UTC+2, David Fanning a écrit :
> Folks,
>
>
>
> I have some function graphics code that produces a box axes on a map.
>
> Because this involves a lot of "after the fact" manipulation, I usually
>
> turn window refreshing off so the user doesn't have to see all the
>
> machinations. But, the window refresh has seemingly gone South in IDL
>
> 8.2.3.
>
>
>
> Here is an example program. It works perfectly until you set the REFRESH
>
> keyword. Then, you just see a big cross in the graphics window. :-(
>
>
>
> ;***********************************************
>
> PRO Window_Refresh_Bug, Refresh=refresh
>
> win = Window()
>
> IF Keyword_Set(refresh) THEN win.refresh, /Disable
>
> mp = Map('Equirectangular', CENTER_LONGITUDE=180, $
>
> BOX_AXES=1, GRID_LATITUDE = 30, GRID_LONGITUDE = 45, $
>
> LABEL_POSITION=0, LIMIT=[-89.99, 0, 89.99, 360], CURRENT=win)
>
> mp['Latitudes'].label_angle=90
>
> mp['Longitudes'].label_angle=0
>
> grid = MapGrid( $
>
> LONGITUDE_MIN=0, LONGITUDE_MAX=360, $
>
> LATITUDE_MIN=-90, LATITUDE_MAX=90, $
>
> GRID_LONGITUDE=45, GRID_LATITUDE=30, $
>
> LABEL_POSITION=1, CURRENT=win)
>
> FOREACH g,grid.latitudes DO g.label_angle=270
>
> FOREACH g,grid.longitudes DO g.label_angle=0
>
> c = MapContinents(Color=!Color.red)
>
> IF Keyword_Set(refresh) THEN win.refresh
>
> END
>
> ;***********************************************
>
>
>
> 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.")
If you manually push the third button from the left in the window, you get the right plot!
Very strange.
alain.
|
|
|
|
|
Re: Yet Another IDL 8.2.3 Anomoly with Window Refresh [message #84928 is a reply to message #84927] |
Tue, 18 June 2013 12:33   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Mark Piper writes:
> Unfortunately, we caught this just before the 8.2.3 release. It's narrow -- you need to disable/enable the refresh on a window that has a map projection with limits defined. Here's a simple reproduce case:
>
> w = window()
> w.refresh, /disable
> m = map('Mercator', current=w, limit=[30, -40, 60, 40])
> w.refresh
>
> Chris already fixed this, though! Please grab these two files:
>
> ftp://download.exelisvis.com/groups/esg/dropoff/map.pro
> ftp://download.exelisvis.com/groups/esg/dropoff/mapprojectio n__define.pro
>
> and drop them into the lib/graphics directory.
Works great. Thanks, Mark!
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: Yet Another IDL 8.2.3 Anomoly with Window Refresh [message #84929 is a reply to message #84927] |
Tue, 18 June 2013 13:07   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 6/18/13 1:19 PM, Mark Piper wrote:
> Unfortunately, we caught this just before the 8.2.3 release. It's narrow -- you need to disable/enable the refresh on a window that has a map projection with limits defined. Here's a simple reproduce case:
>
> w = window()
> w.refresh, /disable
> m = map('Mercator', current=w, limit=[30, -40, 60, 40])
> w.refresh
>
> Chris already fixed this, though! Please grab these two files:
>
> ftp://download.exelisvis.com/groups/esg/dropoff/map.pro
> ftp://download.exelisvis.com/groups/esg/dropoff/mapprojectio n__define.pro
>
> and drop them into the lib/graphics directory.
Great, thanks for quick fixes! By the way, will these fixes be collected
somewhere, besides the next release?
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
|
|
|
Re: Yet Another IDL 8.2.3 Anomoly with Window Refresh [message #84930 is a reply to message #84929] |
Tue, 18 June 2013 13:35  |
Mark Piper
Messages: 198 Registered: December 2009
|
Senior Member |
|
|
On Tuesday, June 18, 2013 2:07:10 PM UTC-6, Mike Galloy wrote:
>
> Great, thanks for quick fixes! By the way, will these fixes be collected
> somewhere, besides the next release?
>
You're welcome, Mike & David! I'm planning a blog post with a zip file overlay, but I'd like to wait to see if the PDF/EPS issue mentioned in another thread has a PRO code fix.
mp
|
|
|