What are the matlab pcolor equivalents in R?

I have a 16x16 grayscale matrix representing handwriting numbers. Is there a plot in R that I can use for visualization?

Matlab has pcolor, I'm looking for something like that. pcolor

+5
source share
2 answers

No need to upgrade to additional packages. Base R already has this, see

  • help(image)

  • help(heatmap)

and Romain's excellent R Graphics Gallery , which has an index for search.

+4
source

There are many options for something like this. One option is to use geom_tilein ggplot2:

library(ggplot2)
ggplot(melt(volcano), aes(x=X1, y=X2, fill=value)) + geom_tile()

: alt text
(: had.co.nz)

: levelplot ( ) color2D.matplot ( plotrix).

+3

All Articles