First, this isn't a finance question, it's an R graphics question, and
you're asking on the wrong list (Brian's a little touchy about that sort
of thing). Second, the data set below is nearly impossible to see
correctly- it doesn't seem to have copied over correctly. Third, there
IS a way to do this using the "mar" and "new" arguments within the "par"
function. I've done something similar to what you're asking before, so
email me the data set in a spreadsheet and I'll see if I can create the
code you're looking for; it probably won't take very long.

On Sat, 2010-04-10 at 18:18 +0530, Rajat Tayal wrote:

> Hi all,
> I have two line graphs drawn with two different pairs of x and y vectors.
> The sample dataset is given below. Here, I have two X vectors assuming positive values. 
> Only one of the y vectors assumes positive values, while the other y vector assumes negative values.
> 
> 
>     
>         
>             
> 
>             
>                 
>                 
>                     
>                         
> X1
>                         
> Y1
>                         
> X2
>                         
> Y2
>                     
>                     
>                         
> 35
>                         
> 0.000534
>                         
> 265
>                         
> -0.000534
>                     
>                     
>                         
> 47
>                         
> 0.000639
>                         
> 281
>                         
> -0.000570
>                     
>                     
>                         
> 65
>                         
> 0.000744
>                         
> 282
>                         
> -0.000572
>                     
>                     
>                         
> 865
>                         
> 0.001312
>                         
> 283
>                         
> -0.000575
>                     
>                     
>                         
> 1265
>                         
> 0.001342
>                         
> 284
>                         
> -0.000579
>                     
>                     
>                         
> 1315
>                         
> 0.001346
>                         
> 285
>                         
> -0.000584
>                     
>                     
>                         
> 1325
>                         
> 0.001347
>                         
> 885
>                         
> -0.001635
>                     
>                     
>                         
> 1472
>                         
> 0.001362
>                         
> 886
>                         
> -0.001636
>                     
>                     
>                         
> 1477
>                         
> 0.001364
>                         
> 887
>                         
> -0.001637
>                     
>                     
>                         
> 1536
>                         
> 0.001386
>                         
> 888
>                         
> -0.001638
>                     
>                     
>                         
> 1541
>                         
> 0.001388
>                         
> 889
>                         
> -0.001640
>                     
>                     
>                         
> 2492
>                         
> 0.001617
>                         
> 890
>                         
> -0.001641
>                     
>                     
>                         
> 2506
>                         
> 0.001622
>                         
> 920
>                         
> -0.001688
>                     
>                     
>                         
> 2516
>                         
> 0.001626
>                         
> 970
>                         
> -0.001761
>                     
>                 
>             
>             
> I am able to plot them as separate graphs using :
> pdf("plot.pdf", height=9, width=6)
> par(mfrow=c(1,2))
> plot(y=y1, x=x1, lwd=2, col="blue", type="l")
> plot(y=y2, x=x2, lwd=2, col="red", type="l")
> dev.off()
> but would like to plot them on one graph in a X-Y coordinate system setup . 
> The idea is to somehow flip one of the curves to the third quadrant of the X-Y coordinate space while the other curve is in the first quadrant. 
> How do I plot the two graphs in one figure ??? 
> Any help would be highly useful.
> 
>         
>     
> 
> Rajat Tayal
> Ph.D Economics Candidate
> Indira Gandhi Institute of Development Research,
> Gen A.K.Vaidya Marg, Filmcity Road,
> Santosh Nagar, Goregaon (East),
> MUMBAI- 400 065.
> 02228416285, 09987284080
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Finance@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
> 



	[[alternative HTML version deleted]]

