Hi! How to find out which plot function is used when i call plot(hist.default(1:10,plot=F)) and all works fine ? The reason why I would like to know it is that after loading some self written R functions> plot(hist.default(1:10,plot=F))Error in xy.coords(x, y, xlabel, ylabel, log) : x and y lengths differ> traceback()5: stop("x and y lengths differ") 4: xy.coords(x, y, xlabel, ylabel, log) 3: plot.default(hist.default(1:10, plot = F)) 2: plot(hist.default(1:10, plot = F)) 1: plot(hist.default(1:10, plot = F)) gives an error. It seems that instead of the function normally used to plot histograms plot.default is called. But which one is normally used? How in general i can find out to find out which plot function is called by an object. R1.9.0 Eryk [[alternative HTML version deleted]]
Hi witek wrote:> How to find out which plot function is used when i call > plot(hist.default(1:10,plot=F)) and all works fine ? > > The reason why I would like to know it is that after loading some self written R functions > >>plot(hist.default(1:10,plot=F)) > > Error in xy.coords(x, y, xlabel, ylabel, log) : > x and y lengths differ > >>traceback() > > 5: stop("x and y lengths differ") > 4: xy.coords(x, y, xlabel, ylabel, log) > 3: plot.default(hist.default(1:10, plot = F)) > 2: plot(hist.default(1:10, plot = F)) > 1: plot(hist.default(1:10, plot = F)) > > gives an error. > It seems that instead of the function normally used to plot histograms > plot.default is called. But which one is normally used? > > > How in general i can find out to find out which plot function is called by an object.> x <- hist(1:10, plot=FALSE) > class(x) [1] "histogram" > methods("plot") [1] plot.acf* plot.data.frame* plot.Date* [4] plot.decomposed.ts* plot.default plot.dendrogram* [7] plot.density plot.ecdf plot.factor* [10] plot.formula* plot.hclust* plot.histogram* [13] plot.HoltWinters* plot.isoreg* plot.lm [16] plot.medpolish* plot.mlm plot.POSIXct* [19] plot.POSIXlt* plot.ppr* plot.prcomp* [22] plot.princomp* plot.profile.nls* plot.shingle* [25] plot.spec plot.spec.coherency plot.spec.phase [28] plot.stepfun plot.stl* plot.table* [31] plot.ts plot.tskernel* plot.TukeyHSD Non-visible functions are asterisked Paul -- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 paul at stat.auckland.ac.nz stat.auckland.ac.nz/~paul