similar to: Mosaic plot using ggplot2

Displaying 20 results from an estimated 40000 matches similar to: "Mosaic plot using ggplot2"

2008 Sep 27
2
multiple plots - editing ggplot2 plot
Hi All, I am trying to build a composite plot, with multiple categories, using ggplot2. In principle, it could be done using facetting, but I do not seem to be able to get past the defaults, so I try building each plot separately, then putting them all together using frameGrob and placeGrob. For this, I need to know how to: 1) format the legend with a different layout (e.g 2 rows by 2 columns,
2010 Mar 22
3
Mosaic Plots
Hello Everyone I want to plot Moasic Plots, I have tried them using iplots package (using imosaic). The problem is the names dont get alligned properly, is there a way to a align the names and provide legend in Mosaic plots using R? Also I would like to know any other packages using which I can plot Mosaic Plots Thank you in advance Sunita -- View this message in context:
2006 Jul 19
1
plain shading (not residuals) in mosaic plot
Hello. I've been using R for a couple of months and enjoying it a lot. This is my first post to R-help. I'm using the vcd package to make mosaic plots with labels on the tiles indicating the number of items in each cell. For example, I've made this plot: > allmorph<-structure(c(10, 26, 17, 100, 70, 97, 253, 430, 185, 177, > 25, 1), .Dim = as.integer(c(6, 2)), .Dimnames
2011 May 01
1
multiple mosaic plots layout
I would like to display multiple mosaic plots from vcd (not defined by a model but derived from different data sets) side by side. Neither par(mfrow=...) nor layout seem to allow to arrange multiple mosaic plots in a grid. Is there an easy way of arranging mosaics in a grid?
2011 Oct 31
1
Help combining cell labelling and multiple mosaic plots
Dear colleagues I'm using data that looks like .test and .test1 below to draw two mosaic plots with cell labelling (the row percentages from the tables). When I take out the pop=FALSE commands in the mosaic commands and comment out the two lines labelling the cells, then the plots are laid out exactly as I'd like: side-by-side. But I do require the cell labelling and the pop=FALSE
2015 Feb 07
3
how to draw paired mosaic plot?
If there are many character variables,and I want to get the mosaic plot of every pair of each variable,how to do then? If the variables are numeric, I can use pairs to get paired scatter plot. But as to the character variables, how to get the "paired mosaic plot"? Many thanks. -- QQ: 1733768559 At 2015-02-07 17:04:26,"Jim Lemon" <drjimlemon at gmail.com>
2008 May 02
2
mosaic plot of "vcd" package does not stretch with 2-dimension?
Hi, I like mosaic function of "vcd" package. I have played around it. I have found out that mosaic plot data table is 2-dimension does not stretch when you enlarge a mosaic plot. It is okay when data table is 3 or more dimension. The first one is of 3-dimension table case, and the second one is 2-dimension. With the first plot, you can drag window to enlarge a plot. With the
2009 Sep 29
2
ggplot2 box plot notches
Dear List, I just googled to find out if notched box plots are possible with ggplot2, but couldn't find a answer to it. boxplot() has the option: notch = TRUE, e.g.: boxplot(mpg$hwy, notch=TRUE) My example code (taken from the net) is: require(ggplot2) qplot(class, hwy, fill=factor(year), data=mpg, geom="boxplot", position="dodge")+theme_bw() Thank you for you help!
2008 May 02
1
A horizontal or vertical line draw on mosaic plot?
Hi, I want to have a horizontal line on a mosaic plot with "vcd" package. This would give me an idea where is 0.5 proportion in a cell. Using "mosaicplot" function of "graphics" package, I can draw a line using "abline." But, with "mosaic" function of "vcd" package, I have tried to use "abline" function, which complains
2001 Nov 30
1
mosaic.by(): vectorizing args passed by apply()?
I've just started learning R, so I'm still on the steep part of the learning curve, but my enthusiasm was heightened by learning that there's a very nice implementation of mosaicplot(). As a learning project, I've already done a basic implementation of a pairs.table() function which does a mosaic scatterplot matrix, and now I'm trying to do conditional mosaic plots (discrete
2007 Sep 19
4
fontsize in mosaic plot lables
Hi List, I am trying unsucessfully to modify the fontsize of lables in mosaic: require(vcd) mosaic(Titanic, pop=FALSE, labeling_args=list(rot_labels=c(bottom=90,top=90), set_varnames = c(Sex = "Gender"), gp_text=gpar(fontsize=20))) #can't get it to resize text tab <- ifelse(Titanic < 6, NA, Titanic) # it works for labeling_cells labeling_cells(text = tab,
2010 Jul 07
4
Gray level mosaic plot with shading_Friendly
Suppose we start with data("Titanic") mosaic(Titanic, shade = TRUE) How do I combine the dashed box contours of shading_Friendly to indicate negative residuals, with three levels of gray: dark for abs(Pearson Resid) > 4, lighter for 4 > abs(Pearson Resid) > 2, and lightest for bs(Pearson Resid) < 2 ? Thanks, Michael ______________________________________________
2008 Nov 17
1
Levelplot + Mosaic Plot hybrid?
Hi. I have built a levelplot with 3 variables, X, Y, and Z where X and Y are the two axes and Z represents the intensity (i.e. Z~X*Y). Now I want to adjust the size of the grid (like a mosaic plot) where the size of each grid is weighted by a variable, W. Just wonder how can I do that with levelplot? I tried exploring mosaic plot. How can I manipulate the "col" option to make it
2007 Sep 27
3
Plotting from different data sources on the same plot (with ggplot2)
Hello everyone (and Hadley in particular), I often need to plot data from multiple datasets on the same graph. A common example is when mapping some values: I want to plot the underlying map and then add the points. I currently do it with base graphics, by recording the maximum region in which my map+point will fit, plotting both with these xlim and ylim parameters, adding par (new=T)
2006 Jan 27
1
monochrome mosaic plot in vcd package
helpeRs, I have a nice looking mosaic plot in an article to be published soon. Sadly, the published version will be in black and white and so ruin the advantage of the default shading scheme of tiles. What would readers suggest as an alternative shading scheme? If I have a black-and-white shading scheme graduated according to suitable cutoffs I won't be able to tell positive from
2009 May 07
1
I updated/reinstalled ggplot2 and the trouble started...
Hi Ian, Per your suggestion, I reinstalled R 2.9.0, then I reinstalled ggplot2 on top. The problem persists. Here's the what happens after the installation: > qplot (carat, price, data = diamonds, alpha = I(1/10)) Warning message: In grid.Call.graphics("L_points", x$x, x$y, x$pch, x$size) : semi-transparency is not supported on this device: reported only once per
2010 Feb 08
3
ggplot2 stacked line plot
Hi all, I have been hunting around for hours trying to figure out how to generate a stacked line chart using ggplot2. This type of chart can be generated in excel 2007 by selecting: Chart type > Line > Stacked line. I can generate a stacked area chart using the following code: p <- ggplot2(~, aes(x = ~, y = ~, colour = Type)) + geom_area(aes(position = 'stack', fill = Type))
2009 May 04
1
mosaic plot with two factors and one continous variable
Hello, my dataset is already aggregated: I have two categorical variables, say "continent" and "country" and one non-negative metric variable "population". Now I would like to produce a mosaic plot which uses "population" to determine how large each area of the plot is. In other words, I fail to find out - how to use the mosaic function of the vcd package
2011 Dec 23
1
ggplot2: behaviour with empty datasets
For example, prepare like this > df.0 <- data.frame(x = 0, y = 0, note = "1") > df.1 <- subset(df.0, note == "1") > df.2 <- subset(df.0, note == "2") Then a call to > ggplot() + aes(x = x, y = y) + > geom_point(data = df.1) + geom_point(data = df.2) produces the error > Error in eval(expr, envir, enclos) : object 'x' not found
2008 May 27
1
label outliers in geom_boxplot (ggplot2)
Dear List and Hadley, I would like to have a boxplot with ggplot2 and have the outlier values labelled with their "name" attribute. So I did > library(ggplot2) > dat=data.frame(num=rep(1,20), val=c(runif(18),3,3.5), name=letters[1:20]) > p=ggplot(dat, aes(y=val, x=num))+geom_boxplot(outlier.size=4, outlier.colour="green") >