r - Specific way of plotting matrix (picture included) -


i plot rather small matrix (4 5) shown in picture - please, see

enter image description here

(it short time-series of indicator, consists of components w+x+y+z. year 1, indicator value denoted "a" equals w_1 + x_1 + y_1 + z_1.) \

any thoughts how plot this? maybe it's not idea plot kind of data. on other, it's not bad imo. , it's better let 5 histograms or worse, 5 pie charts. \

ot: know sites or documents advanced r plots examples? google has found simple plots.

edit: data example (vectors w/x/y/z expressed a percentage)

w <- (0.1,0.15,0.1,0.1,0.3) x <- (0.15,0.15,0.1,0.1,0.25) y <- (0.15,0.10,0.2,0.2,0.05) z <- (0.6,0.6,0.6,0.6,0.4) abcd <- (222222,333333,444444,500000,555555) 

from picture , information provided, can't tell what's going on on righthand side of figure, relative abundance plot you've shown pretty easy make using geom_area ggplot2. here's how data provide:

first, data should in single dataframe in long form, easy reshape package. should add explicit time value each observation:

df<-data.frame(w,x,y,z) library(reshape) df<-melt(df) df$year<-rep(c(1:5),4) 

now data can plotted relative abundance graph:

library(ggplot2) ggplot(df,aes(x=year,y=value,group=variable))+geom_area(aes(fill=variable)) 

is more or less you're trying do? i'm sorry if i've partially answered or misunderstood question- said, i'm still not totally sure you're looking picture.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -