Displaying 20 results from an estimated 700 matches similar to: "ggplot2 - facetting"
2008 Mar 23
2
ggplot2 - legend for fill coulours
Dear All,
I am trying to build a stacked bar plot, where I define the colours to use.
I have asked this before, and I was using a solution in
http://thread.gmane.org/gmane.comp.lang.r.general/100649/focus=100673
(thanks, Thierry).
However, it looks this works only when the data are in the sequence
of the levels in the factor defining the fill colours. When the
sequence is different, the
2007 Dec 17
1
ggplot-How to define fill colours?
Dear R's (most likely Hadley),
I want to build a stacked bar plot where I would like to define which
colours will be used for each of the groups. However, I do not seem
to find a way to do this, even if I've been looking over many places.
I have tried several variations, and my final try was this code, but
I still do not manage to get the colours as I pre-define. Any hints
about how
2005 Sep 14
3
Effects.Scale and form input elements
is it possible to use Effects.Scale to make a set of form input
elements appear in a ''slide out'' effect? I''m trying to build a
control with a button which, when clicked, will cause a row of form
inputs to appear. I can do this with Effects.Appear, but what I
really wanted was for the inputs to appear to ''slide out'' from the
button.
What I
2000 Jul 07
2
Question of programming style
This is really a question of how to program this *BETTER*. It works as I have
done it, but is quite ugly.
I want to do a 3d scatterplot of the upper triangle of a matrix, where the
z-values are the values in the matrix, and the row and column indices are the y-
and x-values. The complete (11 by 11) matrix is mmtop94.2. Here is my awkward
code:
mmtop94.2[lower.tri(mmtop94.2)] <- NA
# Here i
2009 Oct 02
1
ggplot2: proper use of facet_grid inside a function
Hello Again R Folk:
I have found items about this in the archives, but I?m still not getting
it right. I want to use ggplot2 with facet_grid inside a function with
user specified variables, for instance:
p <- ggplot(data, aes_string(x = fac1, y = res)) + facet_grid(. ~
fac2)
Where data, fac1, fac2 and res are arguments to the function. I have
tried
p <- ggplot(data,
2008 Mar 26
2
ggplot2 argument handling odd
Hello there,
I'm trying to do lots of plots in one for-loop. But somehow ggplot does
not evaluate arguments as expected. Here is an example:
library(lattice)
library(ggplot2)
pl <- list()
pl2 <- list()
cDat <- as.data.frame(cbind(x1=0:100,x2=0:10,x3=1:20))
for(obs in c("x1", "x2")) {
pl[[obs]] <- xyplot(cDat[,obs] ~ cDat[,"x3"], main=obs)
2012 Feb 24
1
Telling plot() the max y value to expect when plotting one distribution and then using lines() to add more distributions
I am plotting three Pearson Type IV distributions. It looks like I have to plot the distribution with the highest value of y and then use lines() to add the two distributions that are shorter / have lower max values of y. The following code figures out which distribution has the max y value, plots it first and then uses lines for the other two distributions with a series of three if statements.
2005 Jun 24
3
flashing divs in IE with use of BlindUp and BlindDown
I''m having an issue with flashing divs in IE (firefox is fine and the
only other browser I''ve used)
My scenario is as follows. I have 2 divs (initially hidden) and using
the BlindDown and BlindUp functions (possibly others) the divs flash
when starting to roll down in BlindDown (due to the Element.show call)
and also at the end of the BlindUp call (due to the Element.hide call)
2011 Aug 15
1
ggplot in a function confusion!
Whats going on here?
df<-data.frame(x=1:10,y=1:10)
ggplot()+geom_point(data=df,aes(x=x,y=y)) ## this is the normal usage
right?
ggplot()+geom_point(data=df,aes(x=df[,1],y=df[,2])) ## but I can also feed
it column indices
ggplot()+geom_point(aes(x=df[,'x'],y=df[,'y'])) ## or column names.
## but if i wrap it in a function...
plot.func.one<-function(dff,x.var,y.var){
2013 Jul 25
1
GGplot 2 – cannot get histogram and box plot axis to match.
Problem:
I am trying to get the histogram and box plot x axis to match. I?ve tried using the expand_limits function to make the axis match but that didn?t make the axis match. The histogram?s axis are still consistently larger than the ones for the box plot (though the function did help). Does anyone have a suggestion as to what I should do instead?
Background:
I am building a Shiny app that
2007 Dec 13
2
use ggplot in a function to which a column name is given
Hi everyone, Hi ggplot users in particular,
ggplot makes it very easy to plot things given their names when you
use it interactively (and therefore can provide the names of the
columns).
qplot(x,foo,data=A) where A has columns (x,y,foo,bar) for example
but I would like to use this from inside a function to which the name
of the column is given. I cannot find an elegant way to make this
2005 Oct 18
3
Blind... Effects
Hello,
is there a way to basically achieve a BlindLeft and BlindRight effect and if
yes, how would I do that?
Thank you in advance for your help.
_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
2008 Sep 28
1
reshape package does not recognize second id variable
I am trying to use the reshape package for the first time. I have two
waves of a survey, so the id variables include a subject
identification number and a variable denoting the wave of the survey.
I used the following arguments:
library(reshape)
svy.melt <- melt(svy, id=c("id", "WAVE"))
svy.wide <- cast(svy.melt, id ~ WAVE + ...)
and got the following error:
2008 Sep 17
1
/dev/tty: No such device or address error in newly created CentOS 5.2 domU
Hi all,
I setup a new CentOS 5.2 domU, and then proceeded to install cPanel, which
is a simple task of downloading http://layer1.cpanel.net/latest - and
running it in the command line, as such:
cd /home
wget http://layer1.cpanel.net/latest
sh latest.
But, I get the following error:
sh-3.2# sh latest
Creating directory installd
Verifying archive integrity... All good.
Uncompressing
2009 Apr 07
2
Using as.formula() with the reshape package cast
I am trying to use the "cast" function from the reshape package, where the
formula is not passed in directly, but as the result of the as.formula()
function.
Using reshape v. 0.7.2
I am able to properly melt() by data with:
> molten <- melt(x, id=1:2)
then I can properly cast with this:
> cast(molten, days ~ variable)
but if I try
> cast(molten,
2004 Aug 06
2
compiling error
Hello Icecast group,
I have a problem with compiling lame or other programms, I get always the
message from stupid libtool
libtool is installed, I use Solaris9 (sunOS 5.9)
has any person a idea?
thank you for help
Daniel
# make
cd . \
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
/bin/bash ./config.status
config.status: creating config.h
config.status: config.h is unchanged
2011 May 26
1
Question about ggplot2
Hi all,
Is there any way for me to to string in the argument of qplot or ggplot? for
example
qplot(x='carat',y='price',data=diamonds,geom=c('point','smooth'))
instead of
qplot(x=carat,y=price,data=diamonds,geom=c('point','smooth'))
Thanks!!
Regards,
TszKin Julian
[[alternative HTML version deleted]]
2006 May 31
3
Need help with Junghanns Quadbri
Hi everybody
I hope that somebody can help me with the following ....
I have
2 quadbri cards
2 - 1t0 cards
1 pabx alcatel 4200
I would like to connect my asterisk to the alcatel ,
I installed bristuff 0.3.0-1p ,
loaded the zaphfc driver in NT mode
configured zaptel and zapata , it works great.
then I removed the 1 t0 card,
added the quadbri
loaded qozap : insmod qozap.ko ports=15 ( 4 ports
2006 Oct 17
0
[680] trunk/wxruby2/samples/printing/printing.rb: Cleaned up to use the Ruby naming convention, added #! line, now uses Wx default ID''s in standard menu items.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2011 Jul 18
1
cluster by unique value
Hi,
I need to make a cluster classification by the unique values of the data frame.
I explain the problem. I need to classify this table, and assign to
the same cluster each row that has the same combination of value:
> data1
layer_1 layer_2 layer_3
[1,] 0.2460000000 2 -0.1
[2,] 0.5460000000 3 -0.1
[3,] 0.2460000000 2 -0.1
[4,]