0

I am trying to generate the following plot as an html document, using Rmarkdown, in Rstudio:

color2D.matplot(M,cs1=c(0,1),cs2=c(0,1),cs3=c(0,1),
                extremes=c(1,3),cellcolors=NA,show.legend=TRUE,nslices=10,xlab="Base Price (R)",
                ylab="GP (%)",do.hex=FALSE,axes=FALSE,show.values=FALSE,vcol=NA,vcex=1,
                border="black",na.color=NA,xrange=NULL,color.spec="rgb",yrev=TRUE,
                xat=NULL,yat=NULL,Hinton=FALSE)

But I get the following error:

## Error: could not find function "color2D.matplot"

However, the plot generates perfectly in the Rstudio 'Plots' display. Is there something that can be done so that Rmarkdown can find the function and display the output? Thank you

4

1 回答 1

1

library(plotrix)在调用它的函数之前使用color2D.matplot()

于 2013-01-03T18:11:55.007 回答