similar to: How to plot with different colours

Displaying 20 results from an estimated 10000 matches similar to: "How to plot with different colours"

2008 Sep 06
5
Mode value
Hello everyone, I would like to know if there is any function to calculate the mode value, or I have to build one to do it. Thanks so much Carlos
2008 Sep 15
3
Problems changing to number from character
Hello all, First of all, thanks for your examples to calculate the mode value. But now my problem is the next: I have a?factor and I'm trying to convert it to number with as.numeric(x) but when I see the number it's different, I mean if I have: b<-1,042 d<-as.numeric(b) then when I show d, it appears 432 and I want to work with 1,042 because then I want to calculate the median of
2008 Sep 17
6
creating rainbow gradients
Hi, how can I create a rainbow gradient in R? For example, let's say I have a plot of y = x...and I want the plot to go from red -> orange -> yellow -> green -> blue -> etc. Right now, I know how to do something like go from red to blue, using the plotrix library: library(plotrix) redToBlue <-
2007 Sep 09
2
Problems with strsplit
Hello, I would like to know what can I do if I use strplit with a string and I want to use the middle left,I mean I have this: strsplit("bA531F16-rep","\\-") [[1]] [1] "bA531F16" "rep" I would like to work just with bA531F16 in another variable, what could I do?, Thank you --------------------------------- Sé un Mejor Amante
2009 Apr 04
2
axis colours
Hi, Is there a way to use par to change the colours of the axes lines (not the labels)? I've done this: par(bg = "black") plot(x, y, col = "yellow", pch = 16) but I have to use axes = F within the plot command, and then use axis (1, col = "yellow") axis (2, col = "yellow") and so on for axes 3 & 4. This does not help since the new axes are not
2006 Jul 06
1
Rgraphviz: How to control the colours of edges in a graph
Using Rgraphviz, I draw the undirected graph with vertices A,B,C and D and edges A:B, B:C, C:D, D:A, A:C. I want the vertices A and B to be red and C and D to be blue. The problem is the following: I want the edges A:B and B:C to be green and the edges C:D and C:A to be yellow, while the edge A:C can have the default colour black. I assume that I have to specify this using the edgeAttrs-argument
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
2011 Aug 25
1
question on silhouette colours
I'm fairly new to the silhouette functionality in the cluster package, so apologize if I'm asking something naive. If I run the 'agnes(ruspini)' example from the silhouette section of the cluster package vignette, and assign colours to clusters, two clusters have what appear to be incorrect colours in the silhouette plot. library(cluster) data(ruspini) ar<- agnes(ruspini)
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)
2010 Dec 18
1
Colours for 3-way probabilities
Are there any R functions for creating palettes for three-way data? For example, election maps for three parties where pure red, blue, and green show 100% for the Red, Blue, and Green parties respectively, magenta shows a 50-50 Red-Blue split with 0 for the Greens, cyan a 50-50 Blue/Green split with no Red votes and so on, with grey, black or white at a 1/3,1/3,1/3 split vote. I've spent a
2005 May 24
1
image() and non-well-ordered colours
Hi. I want to use image() with colours that are indexed by two variables. Indexing by one variable is easy: library(colorspace) x <- seq(from=0, to=1,len=30) z <- outer(x,1i*x,"+") image(Re(z),col=hcl(seq(from=0,to=100,len=15),c=100)) OK, so far so good. Now, I want the colour to be a more complicated function of z, in which both the hue and luminance change (thus the colours
2010 Nov 02
1
Colour filling in panel.bwplot from lattice
Inspired by colouring the dots of box-whisker plots I am trying to also fill the boxes (rectangles) with different colours. This seems not to work as I expected. Looking at the help page of panel.bwplot it says: 'fill - color to fill the boxplot'. Obviously it is only intended to fill all boxes with only one colour? Nevertheless the following example shows, that 'fill' from
2010 Nov 04
3
Plotting a grid of directly specified colours
Dear R-help, Could any of you direct me to a function for plotting a grid of colours, directly specified by a matrix of hex colour codes? In other words I'm looking for a heatmap() or image()-like function to which I can specify the colour of each grid location directly, rather than providing a numerical matrix and a 1D-colour scale (heatmap, image, levelplots,NeatMap...). I'm surprised
2012 Apr 13
1
R: Colouring phylogenetic tip labels and/or edges
Hi, I have reconstructed ancestral character states on a phylogeny using MuSSE in the diversitree package and plotted the character state probabilities as pie charts on the nodes. I would, however, like to colour the character states of my extant species, i.e. the tip labels, the same colours as my pie charts, such that all species in state 1 are e.g. blue, species in state 2 red and species in
2006 Sep 13
3
wrong colours when printing from Windows
I have a strange issue with Brother MFC-5440CN printer. When I print from Linux/CUPS, it prints colours fine. When I print from Windows, using Windows drivers (without Samba), it also prints fine. When I print from Windows through Samba/CUPS (drivers added using cupsaddsmb...), it gives me wrong colours: expected | result -------------------- yellow | blue blue | red red | green
2007 May 21
3
Selecting complementary colours
Dear r-helpers, I wonder whether, given the "#rrggbb" representation of a colour, there is a simple way to select the complementary colour, also expressed as a "#rrggbb" string. Any suggestions would be appreciated. John -------------------------------- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604
2010 Sep 20
1
ggplot2 - bar colour
Hi All, I have trying to do what I thought was a reasonably simple graph but I think I'm now going in circles with the colour. Attached is a picture of where I'm up to. The line creating this is: qplot(ageincgraph$age, ageincgraph$rate, position="dodge", stat="identity", geom="bar" ) + aes( colour=ageincgraph$era) +
2004 Dec 21
4
Creating a vector of colours that are as different from one another as possible
Hi I want to create a vector of colors that are as different from one another as possible. ?rainbow states "Conceptually, all of these functions actually use (parts of) a line cut out of the 3-dimensional color space...". This suggests to me that the resulting colors are all placed on this "line" and are equi-distant along it. The resulting color palette is a range of
2008 Jul 07
2
Drawing a colour wheel - bug in hcl?
Hi All, I'm trying trying to draw a colour wheel (a slice of hcl space) in R. Running the code below doesn't give me what I expect - there's some oddly bright colours of the wrong hue around c(0, 0) and I see three coloured circles (a small magenta, a medium sized yellow and a large cyan). Am I doing something wrong or is there a bug in the hcl code? (Also any suggestions for
2013 Apr 03
7
Canadian politcal party colours in ggplot2
A stupid question but does anyone know how to express the actual colours used by the main Canadian political parties? I want to do a couple of ggplot2 plots and have lines or rectangles that accurately reflect the party colours. I can probably play around with RColorBrewer or something to figure it out but if some some already has got them it would save me some time especially with the NDP