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

Home » Public Forums » archive » cgImage and keep aspect ratio
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
cgImage and keep aspect ratio [message #90695] Fri, 27 March 2015 15:16 Go to next message
simulana is currently offline  simulana
Messages: 15
Registered: August 2012
Junior Member
http://user.physics.unc.edu/~chaig/research/images/032715/2d amr1-3_paper.png

I have a strange sizing problem that is cropping up in cgImage. I could probably solve it with a creative use of P.MULTI, but I would prefer to keep control over the positioning in my image because of the colorbar. Here is my position data:

position1 = [0.08,0.68,0.32,0.98]
position2 = [0.35,0.68,0.59,0.98]
position3 = [0.62,0.68,0.86,0.98]
position4 = [0.08,0.35,0.32,0.65]
position5 = [0.35,0.35,0.59,0.65]
position6 = [0.62,0.35,0.86,0.65]
position7 = [0.08,0.03,0.32,0.33]
position8 = [0.35,0.03,0.59,0.33]
position9 = [0.62,0.03,0.86,0.33]
xsizecm = 85
ysizecm = 110

I really don't know what size the outputs are from cgImage, but I was kind of hoping that giving them all the same physical dimensions and using /KEEP_ASPECT_RATIO would make it all shake out correctly. But why are just the first and third in the rows given odd sizing?

Many thanks if you can solve this puzzler.
Re: cgImage and keep aspect ratio [message #90696 is a reply to message #90695] Fri, 27 March 2015 15:19 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
simulana@gmail.com writes:

>
> http://user.physics.unc.edu/~chaig/research/images/032715/2d amr1-3_paper.png
>
> I have a strange sizing problem that is cropping up in cgImage. I could probably solve it with a creative use of P.MULTI, but I would prefer to keep control over the positioning in my image because of the colorbar. Here is my position data:
>
> position1 = [0.08,0.68,0.32,0.98]
> position2 = [0.35,0.68,0.59,0.98]
> position3 = [0.62,0.68,0.86,0.98]
> position4 = [0.08,0.35,0.32,0.65]
> position5 = [0.35,0.35,0.59,0.65]
> position6 = [0.62,0.35,0.86,0.65]
> position7 = [0.08,0.03,0.32,0.33]
> position8 = [0.35,0.03,0.59,0.33]
> position9 = [0.62,0.03,0.86,0.33]
> xsizecm = 85
> ysizecm = 110
>
> I really don't know what size the outputs are from cgImage, but I was kind of hoping that giving them all the same physical dimensions and using /KEEP_ASPECT_RATIO would make it all shake out correctly. But why are just the first and third in the rows given odd sizing?
>
> Many thanks if you can solve this puzzler.

I'd use cgLayout to solve this problem. :-)

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: Translating a Python program to IDL
Next Topic: Save data in hdf with Projection Information

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

Current Time: Wed Oct 08 09:15:06 PDT 2025

Total time taken to generate the page: 0.00667 seconds