YJP wrote:
> HI~ ALL ^^
>
> I want to plot a graph which include another graph.
> Actually, I want to plot a samll part of main graph on
> the marginal region. The small one is just enlarged
> version of the some part of main graph.
>
>
> like this~
> -------------------------------------
> - ----------- -
> - y - - -
> y - - - -
> - ----------- -
> - x -
> - -
> -------------------------------------
> x
>
> Is there any procedure doing this job?
> Otherwise, How do I approch it?
>
> Thank you~^^
>
> Best Wishes, ***
>
Here's an example that works even with !P.Multi NE 0,
slightly modified from the original code which produced
the figure:
http://www.astro.phys.ethz.ch/staff/pgrigis/private/2265fig1 .eps
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
xrange=[0,10]
yrange=[0,10]
N=200
x=findgen(N)/(N-1)*10
y=0.3*exp(x)
plot,x,y,xrange=xrange,yrange=yrange,psym=-4
zoomxrange=[2,3];coordinates of zoom region
zoomyrange=[3,4]
plotxcoord=[5,9];region of the plot where to place the zoomed plot
plotycoord=[5,9];in data coordinates
oplot,zoomxrange[[0,1,1,0,0]],zoomyrange[[0,0,1,1,0]]
zoomcoord=convert_coord(zoomxrange,zoomyrange,/data,/to_norm al)
plotcoord=convert_coord(plotxcoord,plotycoord,/data,/to_norm al)
oplot,[zoomxrange[1],plotxcoord[0]],[zoomyrange[0],plotycoor d[0]],linestyle=1
oplot,[zoomxrange[1],plotxcoord[0]],[zoomyrange[1],plotycoor d[1]],linestyle=1
plot,x,y,xrange=zoomxrange,/xstyle $
,yrange=zoomyrange,/ystyle $
,position=plotcoord[[0,1,3,4]],charsize=0.8 $
,/noerase,yticks=2,ytickv=[3,3.5,4] $
,xticks=2,xtickv=[2.,2.5,3.],xmargin=[0.,0],ymargin=[0.,0],p sym=-4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;
Ciao,
Paolo
|