similar to: Creating a vector of colours that are as different from one another as possible

Displaying 20 results from an estimated 10000 matches similar to: "Creating a vector of colours that are as different from one another as possible"

2005 Mar 30
5
2d plotting and colours
Hi! I am new to R just 3 days in it and i apologize if my questions seem very trivial and consumed your valuable time. I am coding in perl and i stumbled upon R regarding plotting good statistical graphs. I tried the kmean clustering for a large matrix ,say > 150 * 150 . I tried the example code given in the tutorial to perform 2d plot # i ranges from 2 to 10 cl <- kmeans(x, i, 20)
2009 Mar 13
5
Selecting / creating unique colours for behavioural / transitional data
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 between the transition of behaviours, however, all the methods that i have used thus far have
2008 Aug 15
6
continuous coloring of a polygon
R2.7.1, WinXP Hi, I have a polygon inside a circle as follows: radius <- 3 x <- seq(-radius,radius,length=2000) y <- sqrt(radius^2-x^2) xx <- c(x,-x) yy <- c(y,-y) plot(xx,yy, xlim=c(-radius,radius),ylim=c(-radius,radius), type="l", ylab="", xlab="", axes=F) radius <- 2.7 x1 <- seq(-radius,radius,length=2000) y1 <- sqrt(radius^2-x1^2)
2023 Feb 23
2
Palettes {grDevices} - wrong number of colors returned?
Hi, I would have expected that I get always 3 colors as result which is not true: hcl.colors(3, alpha=c(0, 0.5, 1)) # 3 colors rainbow(3, alpha=c(0, 0.5, 1)) # 3 colors heat.colors(3, alpha=c(0, 0.5, 1)) # 3 colors terrain.colors(3, alpha=c(0, 0.5, 1)) # 6 colors cm.colors(3, alpha=c(0, 0.5, 1)) # 6 colors topo.colors(3, alpha=c(0, 0.5, 1)) # 9 colors R-Version and
2004 Dec 10
4
cbind() and factors.
Hi I'm seeing some "odd" behaviour with cbind(). My code is: > cat <- read.table("cogs_category.txt", sep="\t", header=TRUE, quote=NULL, colClasses="character") > colnames(cat) [1] "Code" "Description" > is.factor(cat$Code) [1] FALSE > is.factor(cat$Description) [1] FALSE > is.factor(rainbow(nrow(cat))) [1]
2005 Jul 07
2
Brewer colours
Anyone who is interested in using optimal colour palettes should look at the work of Cindy Brewer: www.colorbrewer.org I have written code to use her colour schemes in R. It is included below. Perhaps someone may find this interesting enough to work into a package. Included also is a function showpalette, which was posted here a while back. I don't remember who wrote it. I have copied all
2008 Jan 07
7
rainbow function
Hello I'm using rainbow function to generate 10 colors for the plot and it is difficult to tell the neighboring colors from each other. How can I make the colors more differently. Thanks Zhaoming [[alternative HTML version deleted]]
2011 Nov 17
1
Getting unique colours
Hey everyone, I am new to R, and I'm making a scatter plot graph where i have a bunch of plots/points that fall into 9 unique categories. I want each category to have a unique colour, however, with the coding I have (below), the colour black is repeated for two of my plot types. Does anyone know a quick way to get 9 unique colours?? Coding: plotba = plot (predictedba ~ actualba,
2010 Jan 26
1
ordisymbol - changing symbols used in plotting factor levels
Hello, I'm trying plot points in an NMDS according to a factor with two levels: fig<-ordiplot(canod.sol, type="none",cex.axis=0.9,cex.lab=0.1,pty="m",tck=-0.01) ordisymbol(fig, y = hab, factor = "habitat", rainbow = T,col = env, legend = F) This gets me part of the way - It produces a plot with blue triangles for the first factor level and red circles
2017 Jun 08
2
Rainbow in loop
Hi R folk I have a distance time graph for a locomotive and at various times different events occur on board the loco. I want to put a vertical line on the speed time graph for each event, but I want to colour each different kind of event differently to see visually whether there's any pattern to these events happening. I could just create a vector of colours and use abline which is easy
2002 Jul 06
5
about image and rgb
Hi all, I have a 16 bit image (TIFF) and i want to analyse the pixels distribution. So, i obtain a matrix which values are between 0 and 2^16 -1. Now i would like to represnt this image with the fucntions rgb() and image(). I am not sure , but i think that only 256 colors are available. So is there a solution to represent all the palette of the colors or i have to limit the representations with
2003 Oct 23
6
repeating colors in graph 2
I've tried looking at ?colors and ?palette and if I'm understanding it correctly, I'm supposed to type in (for example) palette(rainbow(13)) before I type in my plot (of 13 lines) if I want 13 different colors. But this does not work. Other things that i have tried besides rainbow give me errors. Am I just doing something completely wrong? Anna
2006 Nov 07
2
wrong fill colors in polygon-map
Dear all, I would like to produce a map with information about the patenting activity in German districts, by coloring districts with different degrees of patenting activity in different colors. I work with the packages maptools, maps and spdep. The map data is read from an external .shp file (+ the corresponding .shx and .dbf files). Plotting a map with the IDs or the patenting indicator itself
2017 Jun 08
0
Rainbow in loop
Does: rainbow(3)[1] rainbow(3)[2] rainbow(3)[3] ... solve your issue? B. > On Jun 8, 2017, at 8:20 AM, WRAY NICHOLAS <nicholas.wray at ntlworld.com> wrote: > > Hi R folk I have a distance time graph for a locomotive and at various times > different events occur on board the loco. I want to put a vertical line on the > speed time graph for each event, but I
2011 Apr 13
3
latex, eps graphics and transparent colors
I have a diagram to be included in latex, where all my figures are .eps graphics (so pdflatex is not an option) and I want to achieve something like the following: three concentric filled circles varying in lightness or saturation. It is easiest to do this using transparency, but in my test using the postscript driver, the transparent color fills do not appear. Is it correct that postscript()
2011 Dec 12
1
how to colour labels (each label with a colour) in a dendrogram?
Hello to all, I still have this doubt. I'd like to colour the different labels of my dendrogram each one with a different colour. How can I do? I guess I could do using *edgetext* and then *t.col* or* lab.col* but I don't know how to add edgetext to my dendrogram. Can you help me please? Example: require(graphics); require(utils) hc <- hclust(dist(USArrests), "ave") (dend1
2004 Aug 27
1
Plotting irregular grid as image or persp
Hi, I have an array of 2d node locations and an array triangles, and would like to plot something like a image or persp. An example of doing it with rgl is: library(ncdf) library(rgl) # wget http://www.maplepark.com/~drf5n/extras/teapot.nc teapot<-open.ncdf("teapot.nc") z<-get.var.ncdf(teapot,"tris") l<-get.var.ncdf(teapot,"locations")
2002 Oct 02
6
help to make a map on R
Hi all, I need a little help for construct an state's map on R. The first problem is to get the data. I have a datafile of longitude and latitude in the follow format: trajectory latitude longtude T -22.045618 -51.287056 T -22.067078 -51.265888 T -22.067039 -51.207249 T -22.059690 -48.089695 T -22.075529 -48.074608 T -22.072460 -48.044472 T -22.062767 -48.298473 T -22.077349
2004 Jun 14
5
adjusting color palette
Is there a way to increase the "sensitivity" of the color palette in order to more clearly represent certain sections of data? For example I am wanting to clearly differentiate between height data for a rolling landscape but because of the extremes of the dataset (sea and mountain tops), the bulk of the landscape is shaded in closely approximating green - i have attempted to do this by
2009 Nov 23
1
Natural colours for topographic data
Dear list members I'm currently working on some topographic (elevation) data, and was somewhat surprised that the 'topo.colors' and 'terrain.colors' are of little to no use here. The problem is that these functions only return a palette of colours; they don't map depth values to colours. So if I plot (using 'image', 'persp' or similar functions) and