Displaying 20 results from an estimated 3000 matches similar to: "qplot and colors (Please Help)"
2011 Dec 21
3
black and white in qplot? layout 4 graphs in one screen
Hello,
I am trying to plot means and standard errors conditioned by a factor, using
qplot. I am successful at getting the bar graph I want with a error bar,
however I have tried many things and cannot get the bars to change colors.
Currently showing as red and blue, but need it to be black and white for
publication. Any suggestions please?
Using a data set June, which is str:
2010 Jun 16
2
qplot
Hello,
I am a new r-user, and after a great effort I have made this fantastic
figure with qplot:
qplot(ROI, CBF, fill=factor(Carrier), data=combinedboxplot_dataset_se_1_CBF,
geom="boxplot", position="dodge",xlab=NULL,ylab=("CBF,white
matter-normalized"),main=("Differences between carriers and non-carriers on
baseline"))+theme_bw()
Can anyone help me
2018 May 18
3
drc, ggplot2, and gridExtra
I have dose response data I have analyzed with the 'drc' package.
Using plot() works great. I want to arrange my plots and source
data on a single page. I think 'gridExtra' is the usual package for
this.
I could use plot() and par(mfrow=...), but then I can't put the source
data table on the page.
gridExtra provides grid.table() which makes nice graphical tables. It
2018 May 18
0
drc, ggplot2, and gridExtra
On Fri, 18 May 2018, Ed Siefker wrote:
> I have dose response data I have analyzed with the 'drc' package.
> Using plot() works great. I want to arrange my plots and source
> data on a single page. I think 'gridExtra' is the usual package for
> this.
>
> I could use plot() and par(mfrow=...), but then I can't put the source
> data table on the page.
>
2007 Aug 30
2
How to multiply all dataframe rows by another dataframe's columns
Hello,
I have two data frames, X and Y, with two columns each and different numbers
of rows.
# creation of data frame X
Loc1.alleles <- c(1,5,6,7,8)
Loc1.Freq <- c(0.35, 0.15, 0.05, 0.10, 0.35)
Loc1 <- cbind( Loc1.alleles,Loc1.Freq)
X <- data.frame(Loc1)
#creation of data frame Y
Loc2.alleles <- c(1,4,6,8)
Loc2.Freq <- c(0.35, 0.35,
2012 Aug 07
1
Styling gridExtra's title and left labels
Hi,
I'm using the gridExtra package to combine some graphs like in the
arrangeGrob example. Each of the graphs has a title but they appear much
larger than the overall combined plot title and left axis label. Does anyone
know how I can control the style / size of the gridExtra labels?
library(gridExtra)
library(ggplot2)
dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
p1 <-
2007 Dec 11
2
ggplot - Setting the y-scale in a bar plot
Dear All (probably Hadley),
I am now trying to customise some plots using a bar geom.
I do not want to use the default binning statistic, but rather
calculate the bar heigths separately. I do manage this, but for
comparison purposes I would like to have a set of plots all with the
same y-axis height. But I do not seem to find out how to fix the
scale of the y-axis in this case.
Any tips?
2008 Nov 24
3
multiple plots in R
Hi, I just try to draw multiple plots in one page using R, I used par
command. For example I have 7 plots, but instead of arranging them in
the default way
plot1 plot2 plot3
plot4 plot5 plot6
plot7
I want them in this order
plot1 plot2 plot3
plot4 plot5 plot6
plot7
Could somebody tell me how to do this, please? Thanks so many.
Suyan
2013 Mar 06
6
Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?
Hi,
# For publications, I am not allowed to repeat the axes. I have tried to
remove the axes using:
# yaxt="n", but it did not work. I have not understood how to do this in
ggplot2. Can you help me?
# I also do not want loads of space between the graphs (see below script
with Dummy Data).
# If I could make it look like the examples on the (nice) examples page:
#
2013 Apr 01
1
Help Please, ggplot2
library(ggplot2)
a<- read.table("data", header=T)
b = na.omit(a)
ggplot(data=b) + geom_line(aes(x=timepoint, y=value,group=sample, colour= factor(sample))) +? geom_point(aes(x=timepoint, y=value, group=s
ample)) + facet_wrap(~bio, scales = "free",ncol = 5) +theme_bw() + opts(legend.direction = "horizontal",??? legend.position = "top",????
2009 Jun 10
1
ggplot, qplot: alpha channel for colors corresponding to factor
Hi,
I have a qplot like the one in the minimal example below, except I
also have faceting like this:
qplot(jitter(Goodall),jitter(Better.adapt),colour=Second.adapt,facets=~Pol,data=d1)
and with the real data I get quite a lot of overplotting, so I would
like to add an alpha channel.
In addition, I would like to be able to control which colors are used
for each value of Second.adapt (which
2011 Jul 07
1
Confidence bands in ggplot2
Hi,
I have the following data:
> est
sch190 sch107 sch290 sch256 sch287 sch130 sch139
4.16656026 2.64306071 4.22579866 6.12024789 4.49624748 11.12799127 1.17353917
sch140 sch282 sch161 sch193 sch156 sch288 sch352
3.48197696 -0.29659410 -1.99194986 10.23489859 7.77342138 6.77624539 9.66795001
sch368
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 Feb 21
2
jpeg() creating empty files with qplot() in a loop
Hello all,
I'm stuck with a strange issue with writing jpegs of plots to a folder
in a loop.
This works:
for (step in 1:length(steps)) {
jpeg(filename=paste("frame_",sprintf("%05d",step),".jpg",sep=""))
plot(steps[[step]])
dev.off()
}
But if I use qplot to generate the plot (which is my aim):
for (step in 1:length(steps)) {
2011 Nov 15
1
grid.arrange, grid.layout - legend, global y axis title
Hello,
I created several plot with ggplot2 dev mode.
Now I want to combine the plots in a grid
e.g. 2x2 with a fixed size of the output.
What I am doing at the moment is:
grid.newpage()
pushViewport(viewport(layout = grid.layout(nrow=2, ncol=2,
widths = unit(c(7.5,6.5), "cm"),
heights = unit(rep(5, 2), "cm"))))
print(plot1, vp = viewport(layout.pos.row = 1,
2009 Mar 12
3
Unable to run smoother in qplot() or ggplot() - complains about knots
I get the following error when I run qplot()
qplot(grade, read,data = hhm.long.m, geom = c("point", "smooth"))
Error in smooth.construct.cr.smooth.spec(object, data, knots) :
x has insufficient unique values to support 10 knots: reduce k.
I am not sure how to tackle this problem. When I take a subsample (<
1000) than I am able to run that function but with my sample
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")
2011 Jan 14
2
bug in qplot (library ggplot2)
Hello,
this following code give a nice png:
/library(ggplot2)
i <- 1
png(file=paste('test ',i,'.png',sep=''))
qplot(carat, data=diamonds,
fill=color,geom='histogram')+scale_y_continuous(i)
dev.off()
/
I would like to get more files, but the following code doesn't make any
file:
/library(ggplot2)
for (i in 1:2) {
png(file=paste('test
2009 Dec 15
1
for loop for automatic pdf generation
I know this is not reproducible, but I don't want to clog up mail
boxes with the data frame. I would be happy to send this off list. I
am sure that I am missing something simple. The plotting works if I
just paste the call to qplot into R and replace the [i] with a number.
Thanks for all of your help in advance.
#loop to spit out PDFs
list.names <-
2010 Mar 23
2
Creating pdfs using qplot in qqplot2
I am trying to create plots within a for loop and output them to a pdf.
Here is a working example using plot:
gg <- data.frame(datadate=1:4, spread=5:8)
pdf()
for (i in 1:3) {
plot(gg$datadate, gg$spread, main=i)
}
dev.off()
I am trying to learn more about ggplot2 so I try a slight modification
and it doesn't work. Anyone