similar to: Fw: Re: R Stacked Histogram

Displaying 20 results from an estimated 7000 matches similar to: "Fw: Re: R Stacked Histogram"

2009 Jan 09
0
Moving Legend Location for a Stacked Histogram
Thank you again for your response.   This worked great.   Quick question about the legend for qplot.  Instead of being outside the plot, is it possible to move the location of the legend to the upper left or right corner of the plot?  Could you possibly provide an example.   Thank you again for your feedback and insights. --- On Wed, 1/7/09, hadley wickham <h.wickham@gmail.com> wrote:
2011 Jun 21
2
qplot/ggplot2 Questions
I took some data from an online poll about which R GUI people used most and I am messing around with it to learn how to use qplot. Specifically I am making a horizontal bar graph and I have two questions. 1. The categories are ordered in rather strange way at least to me. It is not alphabetical or ascending/descending order of votes cast so i had to manually state the order I wanted which is
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
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
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
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 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)
2010 Jun 18
1
ggplot2 boxplot: horizontal, univariate
In ggplot2, I would like to make a boxplot that has the following properties: (1) Contrary to default, the meaningful axis should be the horizontal axis. Lattice does this, for instance, by library(lattice);bwplot(~mtcars$mpg) (2) It is *univariate*, i.e., of a single vector, say mtcars$mpg. I do not wish to make separate plots for the different values of mtcars$cyl. (3) Nothing on the
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 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 <-
2012 Dec 10
1
qplot error -
Dear friends, I'm on windows, R 2.15.1 - library(ggplot2) #compiled under 2.15.2 qplot(mpg, wt, data=mtcars, colour=cyl) # directly from the qplot help Error in rename(x, .base_to_ggplot, warn_missing = FALSE) : could not find function "revalue" Is that due to a .1 lack in R All the best Troels Ring
2009 Feb 26
1
bottom legends in ggplot2 ?
Has anyone had success with producing legends to a qplot graph such that the legend is placed on the bottom, under the abcissa rather than to the right hand side ? The following doesn't move the legend: library(ggplot2) qplot(mpg, wt, data=mtcars, colour=cyl, gpar(legend.position="bottom") ) I am using ggplot2_0.8.2. Thanks in advance, Avram
2009 Feb 04
5
ggplot: problem with fill option in stat_smooth()
Hi all, I am using ggplot2 and continuing to find it very useful and pretty. However, I am trying to create some graphics for publication that would be included in an MS Word document (not my choice!) in Windows Vista. The problem is that I want to use stat_smooth() to add an fitted linear model line along with its 95% confidence band, but I cannot seem to get the confidence band in a format
2009 Jan 29
2
Adding vertical line to histogram and qplot "stacked" plot
R-users it appears I am leaning on your knowledge once again.  Is there any way to add a vertical line to a histogram and qplot "stacked" plot?  Here is my current attempt:   "qplot" approach attempt: qplot(Run, data = data_dataframe, breaks = breaks, fill = Temperature, main = short_title) + scale_x_continuous("Data") + scale_y_continuous("Freq")
2012 Jan 21
3
semi-transparency not supported in devel R? "alpha" cannot be specified in qplot()
Hi dear all, In my laptop(ubuntu 11.10 64bit), I maintained a released R (2.14) and a developmental R, I can specify qplot(..., alpha = ) in R 2.14 , but when I try to use transparency in developmental R, I got a warning message and the plot is clearly not I want. minimal example: > qplot(data = mtcars, x = mpg, y = cyl, alpha = cyl) Warning message: In grid.Call.graphics(L_points, x$x, x$y,
2012 Jan 21
3
semi-transparency not supported in devel R? "alpha" cannot be specified in qplot()
Hi dear all, In my laptop(ubuntu 11.10 64bit), I maintained a released R (2.14) and a developmental R, I can specify qplot(..., alpha = ) in R 2.14 , but when I try to use transparency in developmental R, I got a warning message and the plot is clearly not I want. minimal example: > qplot(data = mtcars, x = mpg, y = cyl, alpha = cyl) Warning message: In grid.Call.graphics(L_points, x$x, x$y,
2010 Mar 10
1
ggplot2: Changing colour scheme for bar plot filling?
Hello, I'd like to sitch to a monochrome/bw color-palette for the filling of geom_bar-bars (produced via "qplot" as in the example below). Hours of googling didn't yield anything useful, so I thought, I'd just ask ... Thanks, Joh library(ggplot2) qplot(factor(cyl), data=mtcars, geom="bar", fill=factor(cyl))
2010 Mar 24
1
GGPLOT2: Reverse order of legend to match order of x-axis
How do I reverse the order of the legend in a bar plot to match order of the x-axis? In other words, I want the stacked colors of the legend to match the stacked colors of the bar plot. I tried this, but it didn't work. colors <- c("5" = "red","4" = "blue","3" = "darkgreen") p <- qplot(factor(cyl), data=mtcars,
2007 Oct 01
4
how to plot a graph with different pch
I am trying to plot a graph but the points on the graph should be different symbols and colors. It should represent what is in the legend. I tried using the points command but this does not work. Is there another command in R that would allow me to use different symbols and colors for the points? Thank you kindly. data(mtcars) plot(mtcars$wt,mtcars$mpg,xlab= "Weight(lbs/1000)",
2007 Nov 20
1
plotting confidence intervals of regression line
Hello, I am trying to generate a confidence interval (90 or 95%) of a regression line. This is primarily just for illustration on a scatter plot (i.e. I am trying to make this http://www.ast.cam.ac.uk/~rgm/scratch/statsbook/graphics/anima4.gif). I have been trying to use the predict.lm function, with interval set as "confidence", but this still seems to be giving me a prediction