Description Usage Arguments Details Examples
This function plots the changing shares of categories in association with an independent variable.
1 2 3 
x 

b 
( 
ord 

prop 

plot 

col 

xlim 

border 

ylim 

na.valid 

labs 

labs.args 

vertical 

This function is useful for displaying the changing proportions of a category as time progresses. Check out the examples for the most frequent implementations.
To be added: missing portions are omitted in this version, but should be represented as gaps in the polygons.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47  # dummy examples
# independent variable
slc<c(rep(1, 5), rep(2,7), rep(3,6))
# the categories as they change
v1<c("a", "a", "b", "c", "c") # 1
v2<c("a", "b", "b", "b", "c", "d", "d") # 2
v3<c("a", "a", "a", "c", "c", "d") #3
va<c(v1, v2,v3)
# basic function
plot(NULL, NULL, ylim=c(0,1), xlim=c(0.5, 3.5))
parts(slc, va, prop=TRUE)
# vertical plot
plot(NULL, NULL, xlim=c(0,1), ylim=c(0.5, 3.5))
parts(slc, va, col=c("red" ,"blue", "green", "orange"), xlim=c(0.5,3.5),
labs=TRUE, prop=TRUE, vertical=TRUE)
# intensive argumentation
plot(NULL, NULL, ylim=c(0,10), xlim=c(0.5, 3.5))
parts(slc, va, ord=c("b", "c", "d", "a"), col=c("red" ,"blue", "green", "orange"),
xlim=c(0.5,3.5), labs=TRUE, prop=FALSE,
labs.args=list(cex=1.3, col=c("black", "orange", "red", "blue")))
# just the values
parts(slc, va, prop=TRUE,plot=FALSE)
# real example
# the proportion of coral occurrences through time in terms of bathymetry
data(corals)
data(stages)
# time scale plot
tsplot(stages, shading="series", boxes="sys", xlim=c(250,0),
ylab="proportion of occurrences", ylim=c(0,1))
# plot of proportions
cols < c("#55555588","#88888888", "#BBBBBB88")
types < c("uk", "shal", "deep")
parts(x=stages$mid[corals$stg], b=corals$bath,
ord=types, col=cols, prop=TRUE,border=NA, labs=FALSE)
# legend
legend("left", inset=c(0.1,0), legend=c("unknown", "shallow", "deep"), fill=cols,
bg="white", cex=1.4)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.