[R] more graphics questions

ivo welch ivo.welch at yale.edu
Wed Jan 28 01:02:00 CET 2004


hi:  I think I have finally reached some tough(er) graphics questions, 
so help would be appreciated.


* In an ordinary log xy plot, I have two lines

lines( poslowess( x1, y1, f=0.11 ) );
lines( poslowess( x1, y2, f=0.11 ) );

y1 and "y2" are actually a "best" and "worst" scenario.  So, I am 
wondering whether it is tough/easy to shade the area between the two lines.


* I have a historical rate of stock return series (yes, I teach 
finance).  I would like to make a ts plot on the left 
(plot(date,returns,type="h")), and a plot(density(returns)) on the 
right.  works nicely with par(mfrow=c(1,2)), but it would be even nicer 
if I could rotate the density plot 90 degrees, so that it is more 
apparent that the density plot is an aggregation of the points at the 
same y coordinates.  (if need be, a histogram could replace the density 
plot.)  Is it possible to rotate an entire figure.  the "horizontal" 
parameter to ps.options is not an option for plot afaik.


* on an easier question, I got beat:  how do I make the tickmarks appear 
*inside* the graph, and shrink the distance between the tick text and 
the tick axis?


help appreciated.  apologies for imposing on everyone's time.

regards, /iaw




More information about the R-help mailing list