Re: How do I place an image when I am using !P.Multi? [message #88832 is a reply to message #88830] |
Tue, 24 June 2014 11:47   |
Matthew Argall
Messages: 286 Registered: October 2011
|
Senior Member |
|
|
One point is that if you do not use the NOERASE keyword, each new plot will create a new postscript page.
Here is an example that works...
noerase = bytarr(100) + 1B
noerase[0] = 0B
positions = cgLayout([3,3])
for i = 0, 8 do cgPlot, cgDemoData(1), TITLE='Title', XTITLE='X Title', YTITLE='Y Title', $
NOERASE=noerase[i], POSITION=positions[*,i]
However, I noticed that if you increase the number of columns and rows (e.g. to [4,4] with the default window size), then the margin and gap sizes create a funky position that turns things up-side-down, inside-out, and round-and-round.
positions = cgLayout([4,4])
for i = 0, 15 do cgPlot, cgDemoData(1), TITLE='Title', XTITLE='X Title', YTITLE='Y Title', $
NOERASE=noerase[i], POSITION=positions[*,i]
print, positions[*,0]
0.208333 0.801414 0.166667 0.725793
So, you will have to pick a layout that is reasonable for your window size.
|
|
|