similar to: Converting qqplot2 qplot() to grammar?

Displaying 20 results from an estimated 300 matches similar to: "Converting qqplot2 qplot() to grammar?"

2008 Sep 17
1
ggplot2 - deprecated guide= argument in
In the help for scale_fill_identity, it is written ## Not run: colour <- c("red","green","blue","yellow") qplot(1:4, 1:4, fill=colour, geom="tile") qplot(1:4, 1:4, fill=colour, geom="tile") + scale_fill_identity() # To get a legend, you also need to supply the labels to # be used
2008 Feb 21
2
jpeg() creating empty files with qplot() in a loop
Hello all, I'm stuck with a strange issue with writing jpegs of plots to a folder in a loop. This works: for (step in 1:length(steps)) { jpeg(filename=paste("frame_",sprintf("%05d",step),".jpg",sep="")) plot(steps[[step]]) dev.off() } But if I use qplot to generate the plot (which is my aim): for (step in 1:length(steps)) {
2008 Apr 29
2
ggplot2: labels and breaks order does not match and I can't use scale_fill_identity
Hi, I'm plotting a bar chart like this: ggplot() + geom_bar(data=res,aes(fill=f1,x=f2,y=y),stat="identity",position="dodge") f1 contains quite a few levels and the plot is really quite difficult to read when the order of bars on the graph and on the legend does not match. This problem has been discussed recently here:
2008 Mar 23
2
ggplot2 - legend for fill coulours
Dear All, I am trying to build a stacked bar plot, where I define the colours to use. I have asked this before, and I was using a solution in http://thread.gmane.org/gmane.comp.lang.r.general/100649/focus=100673 (thanks, Thierry). However, it looks this works only when the data are in the sequence of the levels in the factor defining the fill colours. When the sequence is different, the
2013 Oct 16
1
[LLVMdev] Unexpected behaviour of the LLVM gold plugin with --allow-multiple-definition
Dear LLVM development team, working with the LLVM gold plugin, I have encountered an unexpected behaviour when the option --allow-multiple-definition (or -z muldefs) is specified for the linker. Let's suppose the following scenario with four simple source files: ----- main.c ------ #include "unit.h" int main() { only_in_unit1(); only_in_unit2(); return
2010 Mar 23
2
Creating pdfs using qplot in qqplot2
I am trying to create plots within a for loop and output them to a pdf. Here is a working example using plot: gg <- data.frame(datadate=1:4, spread=5:8) pdf() for (i in 1:3) { plot(gg$datadate, gg$spread, main=i) } dev.off() I am trying to learn more about ggplot2 so I try a slight modification and it doesn't work. Anyone
2011 Jul 10
2
grey colored lines and overwriting labels i qqplot2
I created this graph in ggplot and added ablines to the different facets by specifying with subset commands. As you might see, there are still a few issues. 1.) I would like to have the diamonds in a grey scale instead of colors. I accomplished this (see graph 2) until I overwrote the label title for the treatments and the colors came back (graph 1). I used these two commands: p=ggplot(data =
2011 Jun 26
1
changing graphs in qqplot2
This is what I have now so far. p=ggplot(data = test, aes(x = YEAR, y = TOTAL, colour = TREATMENT)) + geom_point() + geom_smooth(method = "lm", se=FALSE) + facet_wrap(~COUNTRY) > p +scale_x_continuous(limits=c(1,4)) http://r.789695.n4.nabble.com/file/n3626510/graph.gif I would also like to: 1.) change the headline for the faced wraps ?high? and ?low?. Is there any other way of
2008 Feb 05
2
using image to show RGB image data ?
Hello all, I'm now using image() to show image data (in my case dumps of SOM weights) but would like to show RGB colour data, not just single "z" colour values. I've currently been using seq() to skip 4 values, so I can show the R, G or B channels separately as "z". But is there a way I can show all three channels simultaneously as a proper colour image? Thanks, B.
2018 Feb 16
0
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi > -----Original Message----- > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of greg holly > Sent: Thursday, February 15, 2018 3:58 PM > To: r-help mailing list <r-help at r-project.org> > Subject: [R] Putting 733 discrete categories on Y-axis in qqplot2 as they are > > Hi all; > > I have 733 discrete categories that will go on y-axis in
2018 Feb 16
0
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi What do you mean ?without reordering the names?. Factor variable is ordered according to its levels and you can freely change the ordering. This is why factors are useful and worth to use in many cases instead of character vectors. See this result > iris$MySpecies<-factor(iris$Species, levels(iris$Species)[c(2,3,1)]) > p<-ggplot(iris, aes(x=Sepal.Length, y=Species)) >
2018 Feb 15
2
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi all; I have 733 discrete categories that will go on y-axis in ggplot2. I used the following command to put the name of x-axis. scale_x_discrete (limits = c("SI", "HOMAIR", "AIR","HOMAB","SG","DI","FI","FG")) Since there are only 8 categories on x it was easy to do. Is there any way to do the same for 733 discrete
2018 Feb 16
2
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi Petr; Thanks. I do save the result in pdf by using the following command. ggsave("z7.pdf", p4, height = 95, width = 8, device=pdf, limitsize = F,dpi=300) I can achieve the y axis with 733 levels. But I need get the plot WITHOUT reordering the names. Regards, Greg On Fri, Feb 16, 2018 at 3:39 PM, PIKAL Petr <petr.pikal at precheza.cz> wrote: > Hi > > >
2018 Feb 19
0
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi When you load external file to R, character variables are converted to factors by default and alphabetically sorted. I have limited connection to internet, so I cannot find the answer, you could try it yourself. Maybe you could try not to convert vector with names to factor, which, for plotting issue is not different from factor coding. See ?read.table for details However I am not sure if it
2018 Feb 16
2
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi Petr; I would like to get a plot with names as they are in the original file. They are chemical names and I have 733 in the my file. For example, let me give to chemical names "*2-hydroxybutyrate/2-hydroxyisobutyrate*" and "*palmitoyl-arachidonoyl-glycerol (16:0/20:4) [1]**" .So, what should I put [c(2,3,1)] part in the command: iris$MySpecies<-factor(iris$Species,
2012 May 10
0
Fwd: Re: need help in R
> i need help in my coding > the first line and the second line works and the ggplot works > when i have a code like this and i want to fetch a map and saves it to > a directory how can i put it > because it gives me an error message > Error in load(GGemz) : bad 'file' argument > > GGemz <- ggooglemap(center=center,zoom=13,destfile="Emz.png") >
2010 Jan 27
1
color matrix
Hi, Is it possible to create a heatmap for say a 3x3 matrix of data where every color is pre-assigned? I can easily create a matrix of hex colors but when I try to use that matrix as the parameter for the 'col' option it doesn't work. If it's possible to just display a matrix of hex colors that would work as well thanks -- View this message in context:
2008 Jan 27
1
Putting frame around single panels in ggplot 2 and facet_grid()
Hi I want to highlight two panels in a grid created with facet_grid() by putting a box around it or usiong another background colour. Is this possible, and if yes, how? Thanks Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South Africa Tel: +27 - (0)21 650 5776 (w) Fax:
2009 Apr 21
3
ggplot2 - boxplot of variables / columns
Hi, ggplot/qplot is great - it has really helped me do some nice things. However, simple boxplot of different columns/variables is a bit tricky, because of (i think) qplot's generic Y conditional on X input form. Se below. # Some data: a <- rnorm(100) b <- rnorm(100,1,2) c <- rnorm(100,2,0.5) # normal boxplot of a,b,c boxplot(a,b,c) # Looks good library(ggplot2) # loads qqplot2 #
2023 Aug 02
2
Choosing colours for lines in ggplot2
Hello - I am trying to plot flows in a number of rivers within the same plot, and need to colour the lines differently, using a colour-blind palette. Code beneath works but has colours assigned by the program I have made some simple dummy data: ## code 1 cb8<- c("#000000", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2",