Displaying 20 results from an estimated 1000 matches similar to: "ggplot facet spacing, wrapping"
2009 Nov 22
2
scatter plot & equation
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091122/ca17457e/attachment-0001.pl>
2015 Mar 03
2
Asssistance
Hi to All,
I am building a package in R and whenever I run command "R CMD build OAR"
in the terminal, I get the following error:
* checking for file ?OAR/DESCRIPTION? ... OK
* preparing ?OAR?:
* checking DESCRIPTION meta-information ... ERROR
Malformed Depends or Suggests or Imports or Enhances field.
Offending entries:
R (>=3.0.2)
Entries must be names of packages optionally
2011 Feb 16
1
Faceting article
Hi,
I've been involved in developing a fairly complex site at
http://tilt.ft.com recently, and have acquired an unhealthy interest in
faceting. I couldn't find any good non-academic guides to faceting
strategy on the web, so I thought I'd have a stab at writing one.
I'm not completely happy with it, but it's been sitting in my drafts for
long enough that I thought it
2013 Mar 07
3
ggpliot2: reordering of factors in facets facet.grid(). Reordering of factor on x-axis no problem.
Hi everyone (again),
before you all start screaming that the reordering of factors has been
discusse on several threads and is not particular to ggplot2, hear me out.
I can easily reorder my x-axis factor in facet.grid() in ggplot2. What I
cannot reorder are the factors represented on the strips. I can see that the
graphs are changing, so I am afraid of what it is I am doing. Why is ggplot2
2008 Feb 27
1
how to specify ggplot2 facet plot order
Hi, new to R and ggplot2. I've been trying to get a facet plot in which the
order of the facets is as I require, rather than ordered numerically,
alphabetically, by Roman numerals, mean (answers to these were posted here
after much searching). Here's some test code to demonstrate what I get.
series = c('C2','C4','C8','C10','C15','C20')
ids =
2009 Aug 11
1
ggplot2: override facet names in facet_wrap?
just a quick question (to which I suspect the answer is "no"):
does anyone know if, in the ggplot2 package, there's a way to
override the default names of the facets in facet_wrap (which
correspond to the levels of the factor used to facet)? I know
that I go back and change the levels of the factor, but it would
be convenient to be able to supply a vector of level names at
the time
2008 Jul 30
1
bug in 'margins' behavior in reshape - cast
according to the documentation of the cast function in the reshape function,
I would expect this bit of code from the examples to calculate marginal
means over only the 'diet' variable.
#Chick weight example
names(ChickWeight) <- tolower(names(ChickWeight))
chick_m <- melt(ChickWeight, id=2:4, na.rm=TRUE)
cast(chick_m, diet + chick ~ time, mean, margins="diet")
But,
2008 Jun 16
1
sizing non-vector point shapes in ggplot2
Dear all,
With normal plotting, one can size a set of points in a plot using a vector
argument to cex in the points() function. This works whether you are using
one of the standard R symbols (i.e. 19+) or some ascii symbol, such as '/'
eg:
plot(1:10, 1:10, type='n');
points(1:10, 1:10, cex = 1:10, pch = '/')
Trying to make the transition to ggplot2, I find that the
2007 Oct 30
1
Facets and/or Nested Describes
I have to confess that I did not know about facets before reading
Ashley Moran''s post:
http://aviewfromafar.net/2007/10/21/quick-and-dirty-facets-in-rspec-trunk
Not knowing about the facets solution, I made a couple of feature
requests for nested describes:
http://rubyforge.org/tracker/index.php?func=detail&aid=14980&group_id=797&atid=3152
2007 Jul 16
2
Different axis limits for each facet in ggplot2
Hi!
Is it possible to have different axis limit for each facet in a ggplot2
plot? Here is an example:
--------------------------------------------------------------
library(ggplot2)
x=seq(-10,10,.1)
y=cos(x)
z=sin(x)*10
dat=melt(data.frame(x,y,z), id.var="x")
qplot( x, value, data=dat, facets=variable~., geom="line" )
2013 Oct 12
2
Order of factors with facets in ggplot2
Hello,
I'd like to produce a ggplot where the order of factors within facets is
based on the average of another variable.
Here's a reproducible example. My problem is that the factors are ordered
similarly in both facets. I would like to have, within each facet of `f1',
boxplots for 'x' within each factor `f2', where the boxplots are ordered
based on the average of x
2011 Oct 11
1
controling text in facets (ggplot2)
Hi R-helpers!
Here is my problem:
I have a graph with 3 different facets where there are 3 different
regression line. My goal is to mention separately in each facet each
equation that describes my lines.
So far, I managed to add a line and the same equation to all my facets but
that's not unfortunately what I want.
Is there a way to do that? Any suggestion would be gladly welcome!
Thanks
2009 Feb 11
2
Label bars in a faceted bar plot in ggplot2
Hi List,
I am running R 2.8.0 on a Windows XP machine, running ggplot2 version 0.8.1
I want to label the bars in a faceted grid barplot. Reproducible R
code is given below:
#### reproducible facet barplot #####
library(ggplot2)
# Dataset from which to create the barplot
ml <- rep(1:10,2)
vals <- rnorm(20,mean = 10, sd=1)
type <- c(rep("MAPE",10),rep("AIC",10))
2000 Feb 10
3
creating a grid of function values
I want to create a grid of function values for use in `contour' or
`persp'. The function is the log-likelihood for the gamma. The
sample is stored as vector of length 20 called `Survival'.
A single evaluation of the log-likelihood at, say, scale = 9 and shape
= 10 would be obtained by
sum(dgamma(Survival, scale = 9, shape = 10, log = TRUE))
(This may work only 0.99.0, I'm not
2013 Jan 22
0
Plotting error while using ggplot facet
Hello All,
I am trying to do the comparison of my observed and modeled data sets for
two stations. One station is called station "red" and another is called
"blue". I was able to create the facets but when I tried to add two series
in one facet then only one facet got updated while other didn't.
The data watersurf1.csv can be downloaded from
2013 Oct 15
0
compute current values in a facet
Hello Experts,
I found this example on web and use it just for explanation.
( http://stackoverflow.com/questions/15867263/ggplot2-geom-text-with-facet-grid )
library(ggplot2)
x <-runif(9, 0, 125)
data <-
2008 Mar 04
1
qplot (ggplot2) faceting histogram with missing values
Hi,
I've run into a difficulty with qplot function (in the ggplot2
package). I can facet histograms even when the faceting variable
contains missing values, but only so long as the faceting variable is
not a factor.
Example:
y1 <- rnorm(10)
x1 <- c(rep(1,5), rep(2,4), NA)
x2 <- factor(c(rep(1,5), rep(2,4), NA))
library(ggplot2)
qplot(y1, geom = "histogram", facets =
2011 Feb 10
1
Ggplot: free x-scales in a facet-grid
Hello,
I have a ggplot that has the looks of the plot that I want, but it doesn't
have the right layout.
The data is an ordered melted dataframe:
- ID
- type (to use for a faced grid)
- time - type
- time - value (POSIXct)
- pos (to use for a faced grid, this is an index to split the plot)
The goal of the plot is to create a time line for each ID (different points
of time). The ID's
2010 Sep 11
1
Setting scales for ggplot2 with facets
Faceting in ggplot2 seems to permit different scales for different
facets, but I fail
to see how one could control ylim and xlim ranges for each facet
separately.
For instance, I would like to set the ylim = c(0,10) for facet "A"
and ylim = c(42,102) for facet "B". Since the data is out of these
ranges,
setting facet_grid(factor ~ ., scales = "free_y") does not
2009 Nov 22
1
"Over-coloring" facets on persp() plot
Dear R Community:
Recently, I have managed to plot some really useful graphs of my
research data using persp(). I have even figured out how to overplot
rectangular regions (corresponding to submatrices) with a different
color. This is accomplished by using par(new=T). I am now searching
for a way to "highlight" a set of (possibly non-contiguous) facets with
a specific color,