Extension to "Overplotting Data on !P.MULTI Plots" [message #35727] |
Fri, 11 July 2003 04:35  |
raphael.schefold
Messages: 2 Registered: July 2003
|
Junior Member |
|
|
After overplotting data on !P.MULTI Plots it is sometimes necessary to
plot the axis, titles etc again to have the axis (which is mostly
black) drawn over your data lines (which are often colored).
But plot, data, /noerase, /nodata jumps to the next plot window. For
that,
!p.multi(0)=!p.multi(0)+1 helps, as you can see in the following code.
I am posting, because I met several people who were confused about
that.
-Raphael
Example code for "nodata noerase plot after overplotting Data on
!P.MULTI Plots":
!P.MULTI= [0, 2, 2]
p_sav=replicate(!p, 4)
x_sav=replicate(!x, 4)
y_sav=replicate(!y, 4)
for i=0, 3 do begin
plot, [0,1], [0, 1], title=string(i), /nodata
p_sav(i)=!p & x_sav(i)=!x & y_sav(i)=!y
end
for i=0, 3 do begin
!p=p_sav(i) & !x=x_sav(i) & !y=y_sav(i)
oplot, [.5], [.5], psym=i
end
for i=0, 3 do begin
!p=p_sav(i) & !x=x_sav(i) & !y=y_sav(i)
!p.multi(0)=!p.multi(0)+1
plot, [0,1], [0, 1], title=string(i), /nodata, /noerase
end
|
|
|
|