similar to: how to best present concentrated data points/ ggplot2

Displaying 20 results from an estimated 7000 matches similar to: "how to best present concentrated data points/ ggplot2"

2009 Mar 25
2
[ggplot2] Densityplot, grouping and NAs
Dear all, I do not fully understand how ggplot2 handles NAs. See the following example: library(ggplot2) x <- rnorm(150) g <- as.factor(c(rep(c(0,1,NA),50))) mydf <- data.frame(x,g) m <- ggplot(aes(x = x, group = g, color = g), data = mydf) m + geom_density() How do I get rid of the NAs (i.e. the blue colored curve)? I thought ## m <- ggplot(aes(x = x, group = g, color = g,
2011 Jun 07
1
ggplot2 Histogram with density curve
I am learning ggplot2 commands and I have figured out how to create histograms and density curves but I am not sure how to add a density curve on top of a histogram. Here are the two graphs that I created. ## Histogram t<-rnorm(500) w<-qplot(t, main="Normal Random Sample", fill=I("blue"), colour=I("black"), geom="histogram") w ##Density Curve
2011 Aug 29
1
Legend / bar order - ggplot2
Hi all, I am trying to do a barplot in ggplot2 and want to make sure that the legend order is consistent with the bar order, that is the legend order is orig and match; and the bars are ordered in the same way. It seems to me that I can only control one of them. Any idea? library(ggplot2) df <- data.frame(value = rnorm(20), name = factor(rep(letters[1:10], 2), levels =
2009 Aug 26
2
Statistical question about logistic regression simulation
Hi R help list I'm simulating logistic regression data with a specified odds ratio (beta) and have a problem/unexpected behaviour that occurs. The datasets includes a lognormal exposure and diseased and healthy subjects. Here is my loop: ors <- vector() for(i in 1:200){ # First, I create a vector with a lognormally distributed exposure: n <- 10000 # number of study subjects
2005 Jan 05
2
cAos/CentOS Users in Boston/New England area
I'm still looking for any volunteers in the Boston or New England areas that would be willing to help out at LinuxWorld in February. It goes Feb 14th - 17th, but the expo part is only 15th - 17th. If you can't come all three days, that's fine, but I would appreciate if there were a couple people that could come at least a day or two. Also, If you help out you get a 3 day pass to the
2005 Sep 01
1
OT: SCALE 4x -- Call For Papers
Hello, The call for papers for SCALE 4x, the 2006 Southern California Linux Expo, is now open. This event will be our fourth annual show. It will be held on Feb 11-12, 2006 at the Los Angeles Airport Westin. We are expecting 1,300+ in attendance this year. We are non-profit, community run Linux, open-source and free software conference. If you are working on something you believe the
2009 Jul 28
2
Density plot in ggplot2
Hi all, I was trying to draw a stacked density plot like that : library(ggplot2); library(plyr) dat <- cbind(rnorm(300), rep(c(1,2), each=150)) ggplot() + geom_density(aes(x=dat[,1], fill=factor(dat[,2]), position="stack")) + xlab("") + ylab("") + scale_colour_manual(name = "Pallet", labels = c("X", "Y")) Here
2007 Nov 08
1
ggplot2 facets as rows and columns
Does anyone (Hadley??) know if there's a straightforward way in ggplot2 to get data divided by a single factor to plot as a rectangular grid of subplots? So far I've only been able to get such data plotted as a single row or single column of skinny subplots. The code below gives an example implemented with lattice, and my best attempt in ggplot2 cheers Ben Bolker ------------ g=
2007 Jun 18
1
two bessel function bugs for nu<0
#bug 1: besselI() for nu<0 and expon.scaled=TRUE #tested with R-devel (2007-06-17 r41981) x <- 2.3 nu <- -0.4 print(paste(besselI(x, nu, TRUE), "=", exp(-x)*besselI(x, nu, FALSE))) #fix: #$ diff bessel_i_old.c bessel_i_new.c #57c57 #< bessel_k(x, -alpha, expo) * ((ize == 1)? 2. : 2.*exp(-x))/M_PI #--- #> bessel_k(x, -alpha, expo) * ((ize == 1)? 2. :
2008 Mar 04
1
ggplot2 - Problem with grid plot
Hi R-help I'm trying to create a grid plot in which each plot in the grid contains two density plots (colored by factor) and two vertical lines at the respective medians (also colored by the factor). Using the diamonds dataset as an example, the following commands give me price density plots by factor cut in a single, ungridded plot. p <- ggplot(data=diamonds, aes(x=price)) +
2004 Sep 22
7
Some photos from Astricon 2004
These taken tonight (9/22/2004) at the Expo and Reception Enjoy. http://photos.tropiano.org/gallery/astricon-2004 Lenny
2016 Jul 02
2
Deletion of mail from Junk mailbox
I have a pigeon sive running which directs some of my received mail to the Junk folder. That works just fine. However, a couple minutes later, it is moved to Deleted mailbox and deleted from Junk. At first I thought my client was doing that so I shut down the client and it still happens. Here are the log entries: Jul 2 00:36:31 mail dovecot: imap(doug): copy from INBOX: box=Junk, uid=10842,
2006 Oct 04
4
Linux World Expo - London 25th + 26th Oct 2006
hey guys, CentOS has a stand at the LinuxWorld Expo, London on the 25th and 26th of Oct 2006. And we need some help! We need a few people to come down and help at the stand, talk to visitors and generally spread the good word on CentOS! If you are interested and are able to come help, please get in touch with Lance ( lance at centos.org ) or me ( kbsingh at centos.org ) as soon as possible.
2009 Jul 19
1
trouble using optim for maximalisation of 2-parameter function
Hello, I am having trouble using "optim". I want to maximalise a function to its parameters [kind of like: univariate maximum likelihood estimation, but i wrote the likelihood function myself because of data issues ] When I try to optimize a function for only one parameter there is no problem: llik.expo<-function(x,lam){(length(x)*log(lam))-(length(x)*log(1-exp(-1*lam*
2017 Jun 29
1
Changing ggplot2 legend key/title to custom text
Hi Petr and thanks for your reply, That's the problem I don't want to modify the labels of my legends but the title of the legend in itself inserting my custom text :) Take for example the 1st graph in this tutorial http://www.sthda.com/english/wiki/ggpubr-r-package-ggplot2-based-publication-ready-plots I want to change the "sex" in "sex subscript 2" or "
2017 Jun 29
0
Changing ggplot2 legend key/title to custom text
Hi There are plenty of examples https://stackoverflow.com/questions/6202667/how-to-use-subscripts-in-ggplot2-legends-r https://stackoverflow.com/questions/19507742/using-expressionpaste-to-insert-math-notation-into-a-ggplot-legend which you can modify. If you say "but it wont' seem to work" how can we know what does it mean? Plotmath expressions are rather tricky, especially if
2018 May 22
0
legend order in ggplot2
Hi Your approach seems to me rather complicated. I would reshape data before plotting and maybe also change order of levels in resulting variable factor library(reshape2) dfm<-melt(df) dfm$variable<-factor(dfm$variable, levels=levels(dfm$variable)[c(2,1,3,4)]) p2<-ggplot(dfm, aes(x=rep(1:2,4), y=value)) p2+geom_line(aes(linetype=variable))+
2005 Feb 18
2
Lessons Learned from LinuxWorld Expo
I have just published a article (http://masnetworks.biz/node/20) about exhibiting at LinuxWorld Expo and the lessons learned. I heard some talk about some interest in doing the San Fran show. Please feel free to contact me for any suggestions, help, CD's & DVD's etc. -- Matt Shields http://masnetworks.biz http://sexydates4u.com http://shieldslinux.com http://shieldsmedia.com
2018 May 23
1
legend order in ggplot2
Hi, I ran your code, but the results were not as expected. After I ran the code by "source", it return No id variables; using all as measure variables > p2 and no line or legend is on the graph (as attached) Am I doing anything wrong? John library(ggplot2) library(reshape2) dfm<-melt(df) dfm$variable<-factor(dfm$variable, levels=levels(dfm$variable)[c(2,1,3,4)])
2009 Aug 18
1
8.2 behaving weird on openSuSE 10.3 & 11.0
Listmates, I installed 8.2 on opensuse 10.3 from the opensuse XGL repository to replace 7.6. Compiz works with the nvidia 8600 GT card (512M of GDDR3) on the box, but the ctrl+alt <- -> switching behavior is really bad. In 7.6, the ctrl+alt <- -> desktop switching changed desktops crisply with just the slightest hint of the cube detected during the very short and nice switch.