Gasper Cankar wrote: > Hello everyone. > > For reasons too long to explain I wanted to do plots similar to histograms > with plot(type="h"). > I ran into a problem - if I set line width too high, histogram isn't accurate > anymore. > > For example: > > par(lend=2) > plot(c(2,4,3,2),ylim=c(0,5), type="h") > abline(h=3) > > Column 3 appears just as high as it should. But if I do > > par(lend=2) > plot(c(2,4,3,2),ylim=c(0,5), type="h",lwd=100) > abline(h=3) > > then columns become too high. Can I correct the problem or is there another > way to display my data correctly? >
Try ?barplot instead: bp <- barplot(c(2, 4, 3, 2), ylim = c(0, 5)) axis(side = 1, at = bp, labels = 1:4) abline(h = 3) box() --sundar ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
