similar to: qplot/ggplot2 Questions

Displaying 20 results from an estimated 3000 matches similar to: "qplot/ggplot2 Questions"

2010 Jun 30
2
ggplot qplot bar removing bars when truncating scale
I'm having problems with this example, it is posted with reproduceable code below, both with the normal 0-6 scale and the desired 3-6 scale (with bars removed). How can I get the graph to have the desired 3-6 scale without removing the bars. Thanks! #Data
2010 Aug 11
2
help to polish plot in ggplot2
Hi, I wanted to generate a plot which is almost like the plot generated by the following codes. category <- paste("Geographical Category", 1:10) grp1 <- rnorm(10, mean=10, sd=10) grp2 <- rnorm(10, mean=20, sd=10) grp3 <- rnorm(10, mean=15, sd=10) grp4 <- rnorm(10, mean=12, sd=10) mydat <- data.frame(category,grp1,grp2,grp3,grp4) dat.m <- melt(mydat) p <-
2009 Jan 07
1
Fw: Re: R Stacked Histogram
Hi Jason, > Well, one last questions about stack plot (please forgive the lame example > below). I thought the below allow me to resize the the "title" of the > stacked histogram, but no luck. Any suggestions as to the modificaiton > necessary to get it to work? Right now the title is obscured by the plot > and my boss will be none too happy. Thanks again. Yes,
2012 Feb 06
1
ggplot2 geom_polygon fill
Hi everyone, i've been trying to make a special plot with ggplot2, but I can't get it to fill the polygon I'd like to see filled so very very much. I want to display the difference or change in the distribution of the modified Rankin Scale between two groups. mRS is a scale for disability or daily activities competence. It looks like this.
2011 Dec 04
1
Polishing my geom_bar for publication
Dear list, I am new with ggplot2 and I have spend quiet some time putting together the following code to create the attached plot. However there's still a few things that I'm having trouble with! I would be grateful if someone can tell me how to fix (1) the colour of my bars into grey scales (2) removing the y-axis (species name) on the right figure to avoid duplication, and (3) fix the
2009 Jan 24
2
ggplot2 - how to change location / position of wind rose axis labels?
Dear R users, First just want to say thank you to all for developing such a wonderful software and packages. I need to produce a wind rose plot. Tried with packages circular and plotrix and couldn't quite get what I want. Moved to package ggplot2 and it's going great. However stuck in how to move axis labels. I am using the wind rose from the help to learn how to do what I need (code
2013 Apr 18
1
Arranging two different types of ggplot2 plots with axes lined up
Hi all, I want to arrange two ggplot2 plots on the same page with their x-axes lined up - even though one is a boxplot and the other is a line plot. Is there a simple way to do this? I know I could do this using facetting if they were both the same type of plot (for example, if they were both boxplots), but I haven't been able to figure it out for two different types of plots. Below is my
2011 Apr 03
1
another question on shapefiles and geom_point in ggplot2
Manuel: I changed your variable names from x to 'long' and y to 'lat' on the riqueza_out.csv file. The code below should do what you want. Also, since the legend title is kind of long, I broke it down into three lines so you can see more plot area. I am cc'ing the other groups so more people use it if needed. library(rgdal) library(ggplot2) library(sp) library(maptools)
2011 Aug 16
1
ggplot - some questions concerning histograms
Hello, I am a beginner with ggplot and after doing simple graphs (histogram, segments etc.) some questions came up: 1) I tried to do a histogram, but nothing is displayed although it works with another vector. I think it is because of the very small values (n=1000, min=1.222e-24 max, 1.890e-20). I used qplot(variable,geom="histogram")... If do it with the standard plot function it
2010 Oct 19
3
plot CI and mortality rate
Dear R Users: I have the individual mortality rate and 95% CI of 100 hospitals, how to do the plot with the individual hospital in the Yaxis, and the mortality rate and 95% CI in the Xais and a overall mean as a reference line? Thanks and regards, Xin [[alternative HTML version deleted]]
2011 Aug 31
2
ggplot2 to create a "square" plot
Dear all, I am using ggplot with geom_tile to print as an image a matrix  I have. My matrix is a squared one of 512*512 cells.  The code that does that is written below > print(v + geom_tile(aes(fill=dB))+ opts(axis.text.x=theme_text(size=20),axis.text.y=theme_text(size=20), axis.title.x=theme_text(size=25) , axis.title.y=theme_text(size=25), legend.title=theme_text(size=25,hjust=-0.4) ,
2009 Apr 26
7
Bumps chart in R
Hi there, I would like to make a 'bumps chart' like the ones described e.g. here: http://junkcharts.typepad.com/junk_charts/bumps_chart/ Purpose: I'd like to plot the proportion of people in select countries living for less then one USD pr day in 1994 and 2004 respectively. I have already constructed a barplot - but I think a bumps chart would be better # The barplot and data
2010 Jun 10
1
Order labels in qplot() - ggplot2 {help}
Hello, I want to arrage the label according to my preference eg.. (va, vp, a, b, c) but don't know how to supress default ordering. Any suggestions? Please try the code below: n <- c("va", "vp", "a", "b", "c") p <- c(2, 2,1, 3,5) pm<- c(3,4,2,5,4) pn <- c(1,1,1,2,3) x<-data.frame(cbind(n,p,pm,pn)) library(ggplot2) qplot(x=n,
2007 Sep 20
1
ggplot and xlim/ylim
Hello everyone, I am (happily) using ggplot2 for all my plotting now and I wondered is there is an easy way to specify xlim and ylim somewhere when using the ggplot syntax, as opposed to the qplot syntax. Eg. qplot(data=mtcars,y=wt, x=qsec,xlim=c(0,30)) <-> ggplot(mtcars, aes(y=wt, x=qsec)) + geom_point() + ??? Indeed the ggplot syntax is in general more flexible and powerful and
2010 Aug 30
2
reordering levels error
Please consider the following dataset: I want to reorder the levels by year but get the following error: Error in tapply(v, x, FUN, ...) : arguments must have same length ? I suspect that I need to add the levels before I melt the dataset ?but either way I have only use 'reorder' once before and can't figure ?out how it works..Thanks for any advice. ? winter <- (list(week = c(26L,
2011 Aug 24
1
Scatter plots, linear regression in ggplot2
Hi, Based on some modification that I did to the R Cookbook Graphs Scatterplots code, link:http://wiki.stdout.org/rcookbook/Graphs/Scatterplots%20(ggplot2) I have some questions and I will appreciate a help: - How do I change the legend title? - How can I change the for each linear regression its color and linetype? - How can I add for both the linear regression lines their equations and Rseq
2009 Mar 05
1
is there any option like cex.axis in ggplot2?
Dear list,   I made boxplots using ggplot and want to control for x- and yaxis. Using "plot" I can do it by setting cex.axis equally to any size but can't figure out how to do it with ggplot.     ggplot(dat, aes(x = factor(time), y = volume)) + opts(axis.title.x=theme_text(size=8),axis.title.y=theme_text(size=8)) + geom_boxplot() + geom_jitter(aes(colour = id))+labs(x =
2009 Dec 11
1
ggplot: Problem with legend background
Dear R-users, I am preparing graphs for an upcoming article using the different functions of the ggplot2 package and I've been having problems with the legend background. It doesn't seem to scale when the text size is increased. Here's the mandatory reproducible example: library(ggplot2) repFrame <- data.frame(A= 1:10, B= rnorm(1:10), groupNum = rep(c("First group",
2010 Sep 01
2
ggplot2 multiple group barchart
hi there.. i got a problem with ggplot2. here my example: library (ggplot2) v1 <- c(1,2,3,3,4) v2 <- c(4,3,1,1,9) v3 <- c(3,5,7,2,9) gender <- c("m","f","m","f","f") d.data <- data.frame (v1, v2, v3, gender) d.data x <- names (d.data[1:3]) y <- mean (d.data[1:3]) pl <- ggplot (data=d.data, aes (x=x,y=y)) pl
2011 Oct 18
3
Ordering of stack in ggplot (package ggplot2)
I'm trying to reproduce the 3rd graph on the page of this site: http://learnr.wordpress.com/2009/03/17/ggplot2-barplots/ . However, the data below produces a ggplot with the stacks sorted in alphabetical order from the bottom up. I'd like the stacks to be in the order "Europe", "Asia", "Americas, "Africa", "Oceania". Is there an easy way to