I create a barrier to the distribution of the “DISTANCE” portion of the “STATUS” variable in the data . My code is as follows:
library(R.utils)
df = loadObject("bchart.bin")
df.prop = as.data.frame(prop.table(table(df$STATE, df$DISTANCE),1))
names(df.prop) = c('State','Distance','Proportion')
library(lattice)
pdf(file="bchart.pdf", width=10, height=10, pointsize=10)
barchart(State ~ Proportion, groups=Distance, data=df.prop, stack=T, horizontal=T, auto.key=list(columns=5, space="top"), par.settings = list(superpose.polygon = list(col = rev(gray.colors(5)))))
dev.off()
PDF file here . Why does the legend print "≤" as "..." when the ">" prints well? This only happens with pdf or eps. If I use png, the output
source
share