cgImage and keep aspect ratio [message #90695] |
Fri, 27 March 2015 15:16  |
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  |
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.")
|
|
|