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

Home » Public Forums » archive » fg Margin and Layout keyword problems
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
fg Margin and Layout keyword problems [message #90831] Fri, 24 April 2015 08:45
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
I am trying to make four plots in a 2x2 layout with a rather lengthy caption (example below). The MARGIN and LAYOUT keywords are not playing well together. I set the bottom margin to 0.5, but it is not obeyed; the spacing between plots increases instead.

A few follow-up questions:

1. Why are the margins limited to 0.5? I sometimes want a left margin of 0.75 so I can push a column of plots to the right side of the window. It is much easier to use LAYOUT than to specifying a position for every plot.

2. Why is MARGIN not a keyword of the Window() function? Margins are typically a property of the page, not of the content on the page.

3. It would be helpful to be able to specify the spacing between plots.

4. Why do I have to specify the layout index instead of a layout position? I would rather not have to count to across rows and down columns every time I want to place a plot somewhere. Specifying the [row, column] in which I want to place the plot would be much more helpful.

I use cgLayout for all of this, but it should be natural in function graphics.




figure = window(WINDOW_TITLE='Margins and Layout')
margin = [0.2, 0.5, 0.05, 0.08]

;Create a lag-1 scatter plot for the first 128 data points
; - Plot x_i+1 vs. x_i
p1 = Plot(/TEST, /CURRENT, $
LAYOUT = [2,2,1], $
MARGIN = margin)

p2 = Plot(/TEST, /CURRENT, $
LAYOUT = [2,2,2], $
MARGIN = margin)

p3 = Plot(/TEST, /CURRENT, $
LAYOUT = [2,2,3], $
MARGIN = margin)

p4 = Plot(/TEST, /CURRENT, $
LAYOUT = [2,2,4], $
MARGIN = margin)

;Create a caption
gCaption = Text(0.05, 0.06, $
'Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah !C' + $
'Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah !C' + $
'Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah !C' + $
'Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah !C' + $
'Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah !C' + $
'Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah')
[Message index]
 
Read Message
Previous Topic: IDL Save Object Resoration
Next Topic: Releasing temporary variables created with IDL_MakeTempArray()

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

Current Time: Wed Oct 08 15:48:52 PDT 2025

Total time taken to generate the page: 0.00376 seconds