Hi Glenn,
I think it may be your column names. When I substitute the following for
the last three sections of your example, I get a plot that looks correct.
Obviously I have just made up the colors.
colnames(BO.Vector) <- c("LoanAge", "minus05", "minus04", "minus03",
"minus02", "minus01")
plot(BO.
I can't reproduce the problem with your code. I just get an error because
cbbPalette is not available. Omitting the scale_colour_manual() form your
code give a sensible plot.
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwa
Dear Bruce,
It's doable with ggplot2, but image() is probably a better solution.
To use ggplot2, you will need to convert your array into a data.frame where
each row has the information for one cell (x, y and colour)
library(ggplot2)
#create some dummy data
dataset <- expand.grid(x = seq_len(10
> The problem is that I want HCount and HProbCount to use custom
> gradients. i.e. a colour for 0-10, next shade for 10-30, next for 30-70
> etc.
Use cut to create factor with those levels, and then scale_fill_manual
to match values to colours.
> Due to some magic done on the data, one uses inter
You might want to take a look at
http://had.co.nz/ggplot2/
There are many examples of how to use this function. And, there's a book
coming out soon.
hope this helps
david freedman
Edna Bell wrote:
>
> Hi yet again!
>
> Thank you for being patient with me.
>
> Is there a "how to" for ggplot
5 matches
Mail list logo