[R-SIG-Finance] How to do a real time graph
Dirk Eddelbuettel
edd at debian.org
Mon Apr 27 13:30:13 CEST 2009
On 27 April 2009 at 12:58, Krishna Dagli wrote:
| I have a simple application that reads a pipe delimited line (price and time)
| from a network; over a socket and I want to plot the movement of same
| in real time using a graph.
|
| What packages / approach should I take?
R is not really set up for that. It is neither meant for real-time work, nor
does it incremental plotting all that well. It can be done, but not well.
In the narrow sense, you need to read the documentation about R socket
connections, and about plot() and maybe some of the time-series classes (zoo,
xts, ...) and then just do it.
Two things I have used and am using are
- kst (kst.kde.org) which can handle enormous amounts of data (coming from
astrophysics) really efficiently where you only have to write out a txt
file from which kst reads---that sounds odd, but you keep a cache of the
data outside your app that way which is nice; your existing listener
writes the text file, you only need to parameterise kst and don't need to
write code for it
- do-it-yourself where I use C++ and the qwt plotting widget library (from
sourceforge) on top of Qt (www.qtsoftware.com) along with a few lines of
C++ code---this works great for transformations (spreads, ratios, ...)
too.
But there surely are a number of other choices.
Dirk
--
Three out of two people have difficulties with fractions.
More information about the R-SIG-Finance
mailing list