Francesc Montané wrote:
> Hello useRs,
>
>
>
> I have some problems when I try to plot a lattice. The lattice has 200
> columns (X value) and 5 rows (Y value), with a total of 1000 squares. I
> want to plot this lattice with the squares having different colours
> according to a variable valu
Dear Francesc,
This is rather easy to do with the ggplot2 package.
library(ggplot2)
dataset <- expand.grid(x = 1:10, y = 1:50)
dataset$z <- runif(nrow(dataset))
ggplot(data = dataset, aes(x = x, y = y, fill = z)) + geom_tile() +
scale_fill_gradient(low="white", high="black") + coord_equal()
Hav
> I have some problems when I try to plot a lattice. The lattice has 200
> columns (X value) and 5 rows (Y value), with a total of 1000 squares. I
> want to plot this lattice with the squares having different colours
> according to a variable value.
>
>
>
> The variable I want to plot is cove
3 matches
Mail list logo