similar to: Colors in barplot

Displaying 20 results from an estimated 10000 matches similar to: "Colors in barplot"

2006 Nov 23
1
barplot - x-axis
Hi there, I have a barplot and the labels at the x-axis are strings, which are rotated by 90?. But now the sub-title of the barplot is in between these labels, which does not look very nice... Could anybody help me finding the parameter-setting to prevent this? par(mai=c(1.5,1,1,0.6)) barplot(data, las=2, ylim = c(0,plotMax+1), ylab = "Percentage", main = filename, sub = subtitle)
2009 Jul 27
3
numbers on barplot
Hello all, I have this simple barplot code: ifn <- "id.dat" dat <- read.table(ifn) ofn <- "id.png" bitmap(ofn, type = "png256", width = 30, height = 30, pointsize = 30, bg = "white",res=50) par(mar=c(5, 5, 3, 2),lwd=5) par(cex.main=1.6,cex.lab=1.6,cex.axis=1.6) names(dat)<-c("NumberOfPeople","Average")
2008 Jul 25
4
Matrix barplot
Hi, as a bloody R beginner I failed to solve the probably simple problem to create a barplot of the following data read from a file Year A B C 2000 4 3 0 2001 2 1 3 2002 1 2 5 The Barplot should look like 5 | C 4 | A C 3 | AB C C 2 | AB A C BC 1 |
2006 Nov 24
1
barplot help needed
hello, I would like to create the following barplot: I have 4 different data sets (same length + stddev for each data point) data1 sd1 data2 sd2 data3 sd3 data4 sd4 now, I'd like to plot in the following way: data1[1],data2[1],data3[1],data4[1] with it's sd-values side-by-side at one x-axis label (named "position 1") and each bar in different colors.
2011 Feb 11
2
fitdistr question
Hello, I tried to fit a poisson distribution but looking at the function fitdistr() it does not optimize lambda but simply estimates the mean of the data and returns it as lambda. I'm a bit confused because I was expecting an optimization of this parameter to gain a good fit... If I would use mle() of stats4 package or mle2() of bbmle package, I would have to write the function by myself
2011 Feb 21
2
Console output
Hi there, I though there has been a possibility to force the output on the console with one element per line. Instead of this: > 1:10 [1] 1 2 3 4 5 6 7 8 9 10 something like this > 1:10 [1] 1 [2] 2 [3] 3 [4] 4 [5] 5 [6] 6 [7] 7 [8] 8 [9] 9 [10] 10 Can anybody help? Antje
2008 Dec 05
6
levels update
Hello, I hope this question is not too stupid. I would like to know how to update levels after subsetting data from a data.frame. df <- data.frame(factor(c("a","a","c","b","b")), c(4,5,6,7,8), c(9,1,2,3,4)) names(df) <- c("X1","X2","X3") my.sub <- subset(df, X1 == "a" | X1 == "b")
2006 Nov 01
4
extract values from a vector
Hello, I'm looking for a solution for the following problem: I have two vectors V1 <- c("apple","honey","milk","bread","butter") V2 <- c("bread","milk") now, I would like to know for each element in V1 if it's equal to one of the elements in V2 I could do: which(V1 == V2[1] | V1 == V2[2]) but what if I
2008 Dec 02
3
boxplot via plot command
Hi folks, I've just discovered that the following code leads to boxplot (surprisingly to me). Can anybody explain to me why? Is this documented somewhere? I've never consider this option before. x <- rnorm(300) l <- c(rep("label1",100), rep("label2",50), rep("label3",150)) df <- data.frame(as.factor(l), x) plot(df) Thank you! Antje
2005 Apr 18
3
Barplot and colors for legend
Hi all! One quick question: How do I get the standard colors used by barplot? I have some stacked bars and would like to add a horizontal legend via legend() but I don't know how to find the colors for the fills of the legend points. Thanks! Werner
2006 Aug 23
5
two density curves in one plot?
Hello, I was wondering if I can plot two curves I get from "density(data)" into one plot. I want to compare both. With the following commad, I just get one curve plotted: plot( density(mydata) ) Sorry for this stupid question but I could not find a solution until now... Antje
2009 May 04
4
levelplot question
Hi there, I have a question concerning the behaviour of the colouring with levelplot. (I hope, I manage to explain) If I give the parameters "at" and "col.regions" like this: at <- c(1,2,3,4,5,6) col.regions <- c("blue","blue","blue","yellow","yellow","yellow") Which color would have the value 3.5? I would
2009 Jul 29
1
Drawing lines in margins
Hi all, Quick question: What function can I use to draw a line in the margin of a plot? segments() and lines() both stop at the margin. In case the answer depends on exactly what I'm trying to do, see below. I'm using R v. 2.8.1 on Windows XP. Cheers, Alan I'm trying to make a horizontal barplot with a column of numbers on the right side. I'd like to put a line between the
2007 Oct 30
2
flexible processing
Hello, unfortunately, I don't know a better subject. I would like to be very flexible in how to process my data. Assume the following dataset: par1 <- seq(0,1,length.out = 100) par2 <- seq(1,100) fac1 <- factor(rep(c("group1", "group2"), each = 50)) fac2 <- factor(rep(c("group3", "group4", "group5", "group6"), each =
2017 Jan 12
3
rgl
----Original Message----- From: Martyn Plummer [mailto:plummerm at iarc.fr] Sent: Thursday, January 12, 2017 3:36 AM To: Weiner, Michael <weinerm at ccf.org>; r-sig-fedora at r-project.org Subject: Re: [R-sig-Fedora] rgl >One possibility is that you have the 32-bit version of mesa-libGL-devel installed. This will provide the headers but not the 64-bit l>ibrary which is what you need
2010 Mar 16
2
Retrieving latitude and longitude via Google Maps API
Does anyone have any experience retrieving latitutde and longitude for an address from the Google Maps API? I'd like to have an R script that submits a street address, city, state, and zip code and returns the coordinates. So far, I've been submitting the coordinates from another program, then loading the coordinates in R and merging them back into the data frame I want to use.
2011 Feb 01
1
mle question
Hello, I tried to use mle to fit a distribution(zero-inflated negbin for count data). My call is very simple: mle(ll) ll() takes the three parameters, I'd like to be estimated (size, mu and prob). But within the ll() function I have to judge if the current parameter-set gives a nice fit or not. So I have to apply them to observation data. But how does the method know about my observed
2009 Jan 20
5
from matrix to data.frame
Hello, I have a question how to reshape a given matrix to a data frame. # ---------------------------------- > a <- matrix(1:25, nrow=5) > a [,1] [,2] [,3] [,4] [,5] [1,] 1 6 11 16 21 [2,] 2 7 12 17 22 [3,] 3 8 13 18 23 [4,] 4 9 14 19 24 [5,] 5 10 15 20 25 > colnames(a) <- LETTERS[1:5] > rownames(a) <-
2011 Feb 07
2
question mle again
A few day ago, I was looking for an answer to my question but didn't get one. Anybody who can help now? Hello, I tried to use mle to fit a distribution(zero-inflated negbin for count data). My call is very simple: mle(ll) ll() takes the three parameters, I'd like to be estimated (size, mu and prob). But within the ll() function I have to judge if the current parameter-set gives a nice
2009 May 05
3
Heatmap without levelplot
Hi there, as I'm not sure to understand the coloring levelplot uses, I'm looking for another easy way to create a heatmap like this: library(lattice) mat <- matrix(seq(1,5, length.out = 12), nrow = 3) mat[1,2] <- 3.5 my.at <- seq(0.5,5.5, length.out = 6) my.col.regions <- rainbow(5) graph <- levelplot(t(mat[nrow(mat):1, ] ), at = my.at, col.regions = my.col.regions)