[R-SIG-Finance] How to add net lines to quantmod charts

Stergios Marinopoulos stergios_marinopoulos at yahoo.com
Tue Aug 30 16:37:58 CEST 2011


Try using the experimental versions of the charting commands: 

require(quantmod) 
getSymbols("SPY") 
chart_Series(SPY, subset="2011-08::", type = "candlesticks" ) 
text(9, 112.00, "SOME TEXT", adj=0); 
segments(9, 111.5, 12, 111.5) ; 


The X coordinates in text() and segments() align with the 
ordinal number of the bar as it appears on the chart.  The Y coordinates
 are the prices and seem to properly align with the y-axis scale. 

I am interested to learn how to divine the height and width of 
text rendered in chart in order to properly decorate text with other 
graphics 

--
Stergios Marinopoulos



More information about the R-SIG-Finance mailing list