[R] cuts and breaks

José Ernesto Jardim ernesto at ipimar.pt
Thu Sep 27 18:24:54 CEST 2001


Hi

I'm using the "image" function to produce a plot and I want to define 
the breaks using "cut" and the colors using "heat.colors".

 > 
image(interp(mat2[,2],mat2[,1],mat2[,3]),breaks=cut(mat2[,3],30),col=heat.colors(29))
Error in image.default(interp(mat2[, 2], mat2[, 1], mat2[, 3]), breaks = 
cut(mat2[,  :
        must have one more break than colour


The error message is not clear to me because I'm using 30 to cut and 29 
to heat.colors.

What am I doing wrong ?

Thanks

EJ

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list