Problem with cgColorBar in resizable Window [message #75366] |
Sun, 06 March 2011 04:42 |
Fabzou
Messages: 76 Registered: November 2010
|
Member |
|
|
Hi,
I am having trouble with the following small program. It runs very fine
without setting /Resizable but setting the keyword would erase the
device and plot only the colorbar... Am I missing something here???
pro test_cgImage, RESIZABLE = resizable
;Data
img = cgDemoData(18)
; Window size
xs = 550
ys = 400
if KEYWORD_SET(RESIZABLE) then begin
cgWindow, WXSIZE=xs, WYSIZE=ys
cgControl, EXECUTE=0
Window = 1
endif else begin
cgDisplay, /FREE, XSIZE=xs, YSIZE=ys
endelse
cgImage, img, WINDOW = window, /SAVE, /NORMAL, $
POSITION = [0.05,0.09,0.8,0.9], /KEEP_ASPECT_RATIO, /AXES
cgColorbar, Position= [0.8,0.15,0.83,0.8], /VERTICAL, /RIGHT,$
WINDOW=window
if KEYWORD_SET(RESIZABLE) then cgControl, EXECUTE=1
end
Thanks a lot,
Fabien
|
|
|