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

Home » Public Forums » archive » cgContour / P.Multi / PDF
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
cgContour / P.Multi / PDF [message #79873] Wed, 18 April 2012 17:45 Go to next message
Matteo is currently offline  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
Re: cgContour / P.Multi / PDF [message #79970 is a reply to message #79873] Fri, 20 April 2012 14:13 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Matteo writes:

> Another thing I noticed that doesn't work is the xtick_get keyword,
> when the /Add keyword is present.
> Can that be fixed as well?

No, that can't be fixed in this system, which uses
keyword inheritance for keywords. If you need the
information, you will have to draw your plot in
a regular graphics window (maybe a pixmap, if you
don't want anyone to see you doing it), and get
the information from there.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Manipulation with 4D data in iVolume tool
Next Topic: Coyote Library Updates

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

Current Time: Wed Oct 08 15:07:22 PDT 2025

Total time taken to generate the page: 0.00842 seconds