Here's another offering of an attempt to create unique colors. These are
light/medium colors...no dark colors.
cols - matrix(c(0, 0, .90, # gray
.3, 0, .70,
.6, 0, .50,
0, .15, 1, # red
0, .30, 1,
0, .45, 1,
Ross Culloch wrote:
Hi Kingsford,
Thanks yet again for your help! I have tried this, and once again i have
failed! I have put the code that i've used below (i'm sure you'll note some
bad practice) if that is any use to help explain where i'm going wrong, it
seems to run fine and feeds back just
Hi Jim, that works, which is great!!! Alexis also gave me an answer that
works if you wanted to look at that post, but that was based on adding
colours to existing Sets from BrewerColor. However, your answer is the first
i've got where you can actuall pick your entire palette, it's something that
On Fri, Mar 13, 2009 at 7:58 AM, Ross Culloch ross.cull...@dur.ac.uk wrote:
Hi Kingsford,
Thanks yet again for your help! I have tried this, and once again i have
failed! I have put the code that i've used below (i'm sure you'll note some
bad practice)
It doesn't appear you changed the
Dear all,
This seems like a simple problem but i've searched the help files and tried
various options but failed, so apologies in advance for asking what i'm sure
is an easy thing to do!
In short, I have displayed behavioural data using the TraMineR package such
that there is a colour change
Hi Kingsford,
Thanks for the reply - some of the sets/palettes in the RColorBrewer are
ideal, but the problem with the problem i have is that they only go up to 12
colours, and i need 15 colours - so i assume the only thing i can do is
create my own palette, but i'm having limited success in
One option for creating your own palette is
#install.packages('epitools')
mycols - colors.plot(locator = TRUE)
then left-click on 15 colors of your liking and then right-click 'Stop'.
mycols will be a data.frame with the third column containing the color names.
Kingsford
On Fri, Mar 13, 2009
Many thanks yet again for your reply, thanks for that method, i gave it a go
and i checked 'mycols' and sure enough it had selected the chosen colours
and listed their names, but when i used it for making the graph warnigs
informed me that the supplied colour in not numeric or character.
Ross
Thanks for the reply - some of the sets/palettes in the RColorBrewer are
ideal, but the problem with the problem i have is that they only go up to 12
colours, and i need 15 colours - so i assume the only thing i can do is
create my own palette, but i'm having limited success in trying to work
Hi Oliver,
Thanks very much for your reply. I have tried your script, but when the
script for the graph runs it comes up with several error messages repeating
that 'supplied colour is not numeric or character'
Olivier Delaigue wrote:
library(colorRamps)
image(matrix(1:150, 10), col =
On Fri, Mar 13, 2009 at 7:19 AM, Ross Culloch ross.cull...@dur.ac.uk wrote:
Many thanks yet again for your reply, thanks for that method, i gave it a go
and i checked 'mycols' and sure enough it had selected the chosen colours
and listed their names, but when i used it for making the graph
Hi Hadley,
Many thanks for your post. You're not wrong - i'm certainly finding it
challenging, but i assumed it was because i was making some basic errors. My
data are 15 types of behaviour, e.g. resting, alert, locomotion, etc. so i
need to use 15 colours to tell each appart in a barplot which
Hi Kingsford,
Thanks yet again for your help! I have tried this, and once again i have
failed! I have put the code that i've used below (i'm sure you'll note some
bad practice) if that is any use to help explain where i'm going wrong, it
seems to run fine and feeds back just what you noted it
library(colorRamps)
image(matrix(1:150, 10), col = blue2green2red(15))
Regards,
Olivier Delaigue
Ross Culloch wrote:
Dear all,
This seems like a simple problem but i've searched the help files and
tried various options but failed, so apologies in advance for asking what
i'm sure is
Hi Ross,
If you really need 15 colors, maybe you can use the Set3 palette
provided by RColorBrewer (this is the one used by TraMineR up to 12
states) and add yourself 3 more colors ?
For example (you can mix the hexadecimal color numbers from the
RColorBrewer palette and real color names in
Hi Alexis,
In my opinion you are nothing short of genius! That worked a treat, i
thought it would be something simple, but i could not find the script or an
example anywhere!!!
That was a massive help and has salvaged my day! :clap:
Thanks very much to everyone else that helped, it was much
Hi Ross,
If you really need 15 colors, maybe you can use the Set3 palette
provided by RColorBrewer (this is the one used by TraMineR up to 12
states) and add yourself 3 more colors ?
For example (you can mix the hexadecimal color numbers from the
RColorBrewer palette and real color names in
17 matches
Mail list logo