[R-SIG-Finance] [R-sig-finance] Plot TS-matrix as a surface

Adams, Zeno Zeno.Adams at ebs.edu
Thu Feb 26 13:42:54 CET 2009

I usually use the wireframe() function from the lattice package. I think it is more comfortable to use than persp() and has more intuitive inputs. The wireframe() function requires the value of the third variable (or function) in the (ith, jth) element of your matrix.
For example if you want to plot the likelihood function for two parameters p1 <- c(0.5, 1, 1.5, 2) and p2 <- c(-0.3, 0, 0.3, 0.6, 0.9) then the matrix mat is 4x5 and the [3,2] element of mat contains the value of the likelihood function when p1 is 1.5 and p2 is 0.

-----Ursprüngliche Nachricht-----
Von: r-sig-finance-bounces at stat.math.ethz.ch [mailto:r-sig-finance-bounces at stat.math.ethz.ch] Im Auftrag von R at Nabble
Gesendet: Donnerstag, 26. Februar 2009 12:26
An: r-sig-finance at stat.math.ethz.ch
Betreff: [R-SIG-Finance] [R-sig-finance] Plot TS-matrix as a surface

I'd like to be able to plot a time-series matrix (i.e. first col contains
sorted dates, rest of cols contains non-sorted data, with headings at the
top; current format is as a zoo object) as a surface/3D chart. The function
persp() is giving me errors, even if I transform data as core data, etc.

Any suggestions / other functions available?


View this message in context: http://www.nabble.com/Plot-TS-matrix-as-a-surface-tp22222236p22222236.html
Sent from the Rmetrics mailing list archive at Nabble.com.

R-SIG-Finance at stat.math.ethz.ch mailing list
-- Subscriber-posting only.
-- If you want to post, subscribe first.

EBS European Business School gemeinnuetzige GmbH - Sitz der Gesellschaft: Wiesbaden, Amtsgericht Wiesbaden HRB 19951 - Umsatzsteuer-ID DE 113891213 Geschaeftsfuehrer: Prof. Dr. Christopher Jahns,  Rektor/CEO; Dr. Reimar Palte,  Kanzler/CFO;  Sabine Fuchs, CMO; Verwaltungsrat: Dr. Hellmut K. Albrecht, Vorsitzender

More information about the R-SIG-Finance mailing list