I can't figure out how to get the x-axis to contain the category lables for
my frequency polygon.  I'm also not sure if there is a more elegant
approach.  Any insights on the labels?

I tried this:
#generate some pseudo data

x=c(sort(sample(1:1500,5)),sort(sample(1:1500,3),dec=T))

# assign names to the vector

names(x)=c("0-13","14-19","50-99","100-149","150-199","200-249","250-299","3
00+")



#Plot a frequency polygon

# This displays as inicies, not labels:

plot(x,type="b",col="red")



#This almost works (adds labels) but produces errors and scrambles y-axis

plot(x,type="b",col="red",labels=labels(x))



I looked at ?axis but could not see a solution there.  Thanks in advance.



Rob

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to