cgContour / P.Multi / PDF [message #79873] |
Wed, 18 April 2012 17:45  |
Matteo
Messages: 28 Registered: August 2011
|
Junior Member |
|
|
Hi,
I noticed David's solution to a problem similar to something I'm
trying to solve:
http://www.web-shelf.com/comp.lang.idl-pvwave/Re-How-to-plot -multiple-cgContour-plots-using-the-same-colour-thread-ID299 46.aspx.
I was wondering: if I substitute cgDisplay with cgWindow, and employ
the /Add keyword for cgContour and cgColorbar, how come when I save
the pdf from the GUI the document is saved in 2 pages instead of one?
Even resiing the window deltes one of the two plots
This is the code that replicates the problem:
data = cgDemoData(2)
data1 = Scale_Vector(data, 400, 1500)
data2 = Scale_Vector(data, 0, 900)
levels = Indgen(16)*100
cgLoadCT, 33, NColors=16, Bottom=1
c_colors = Indgen(16) + 1
;cgDisplay, 900, 300
cgWindow,xsize=900,ysize=500
!P.Multi=[0,2,1]
ymargin = !Y.OMargin
!Y.OMargin=[3,10]
cgContour, data1, Levels=levels, C_Color=c_colors, /Fill, $
XStyle=1, YStyle=1, /Add
cgContour, data2, Levels=levels, C_Color=c_colors, /Fill, $
XStyle=1, YStyle=1, /Add
cgColorbar, NColors=16, Bottom=1, RANGE=[Min(data), Max(data)], $
Divisions=16, position = [0.25, 0.85, 0.75, 0.89], /Add
!P.Multi=0
!Y.OMargin = ymargin
end
|
|
|