Displaying 20 results from an estimated 120 matches for "theme_bw".
2017 Aug 25
2
about multi-optimal points
...s 1, v2 to be as
close as 0. Thanks very much.
DF
ID v1 v2 v3
1 0.8 0.1 0.7
2 0.85 0.3 0.6
3 0.9 0.21 0.7
4 0.95 0.22 0.8
5 0.9 0.3 0.7
6 0.8 0.4 0.76
7 0.9 0.3 0.77
...
fig1 = ggplot(data=DF, aes(x=v1,y=v2))+ geom_point()+ theme_bw()+
xlab('Variable 1')+ ylab('Variable 2')
print(fig1)
fig2 = ggplot(data=DF, aes(x=v1,y=v3)+ geom_point()+ theme_bw()+
xlab('Variable 1')+ ylab('Variable 3')
print(fig2)
[[alternative HTML version deleted]]
2017 Aug 26
0
about multi-optimal points
...et the colour aesthetic.
The ID is numeric so ggplot applies a colour scale. If we cast ID to a
factor we get the appropriate colouring.
test_df <- data.frame(ID = 1:20, v1 = rnorm(20), v2 = rnorm(20), v3 =
rnorm(20))
ggplot(data=test_df, aes(x=v1,y=v2, colour = as.factor(ID))) +
geom_point()+ theme_bw()+
xlab('Variable 1')+ ylab('Variable 2')
How to choose a number of samples from the dataset you can use the subset
function to select by some variable:
sub_test_df1 <- subset(test_df, ID < 5)
ggplot(data=sub_test_df1, aes(x=v1,y=v2, colour = as.factor(ID))) +
geom_point()...
2017 Jun 16
2
point size
Hi all;
I am running the following ggplot codes. Runs well. However, I need to
reflect the numeric values of the log10_P to the point size in the graph.
Your help highly appreciated,
Regards,
Greg
p <- ggplot(mydata, aes(x = X, y = log10_P)) +
theme_bw() +theme(panel.border=element_blank())
+ theme(legend.position="top", axis.text=element_text(size = 8))
(p1 <- p + geom_point(aes(color = Traits)
[[alternative HTML version deleted]]
2017 Aug 26
1
about multi-optimal points
...s numeric so ggplot applies a colour scale. If we cast ID to a
> factor we get the appropriate colouring.
>
> test_df <- data.frame(ID = 1:20, v1 = rnorm(20), v2 = rnorm(20), v3 =
> rnorm(20))
>
> ggplot(data=test_df, aes(x=v1,y=v2, colour = as.factor(ID))) +
> geom_point()+ theme_bw()+
> xlab('Variable 1')+ ylab('Variable 2')
>
> How to choose a number of samples from the dataset you can use the subset
> function to select by some variable:
> sub_test_df1 <- subset(test_df, ID < 5)
>
> ggplot(data=sub_test_df1, aes(x=v1,y=v2, colour...
2017 Jun 16
0
point size
You could add size = log10_P to the aes() inside geom_point().
Untested code below.
See also http://ggplot2.tidyverse.org/reference/geom_point.html
ggplot(mydata, aes(x = X, y = log10_P)) +
theme_bw() +
theme(panel.border=element_blank(), legend.position="top",
axis.text=element_text(size = 8)) +
geom_point(aes(color = Traits, size = log10_P))
Jean
On Fri, Jun 16, 2017 at 9:33 AM, greg holly <mak.hholly at gmail.com> wrote:
> Hi all;
>
> I am running the follow...
2013 Mar 06
6
Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?
...position = "dodge", width = 0.3, size=3) +
geom_line(aes(linetype=factor1), color = "black", size = 0.5) +
geom_errorbar(aes(ymin = mean - sdv , ymax = mean + sdv), width = 0.3,
position = "dodge", color = "black", size=0.3) +
theme_bw() +
ylab(expression(paste("my measured stuff"))) +
xlab("factor3") + ggtitle("") +
labs(color = "factor1", shape = "factor1", group = "factor1",
linetype = "factor1")
p1
#Plot: levels C and D:
# Summary (means et...
2011 Dec 04
1
Polishing my geom_bar for publication
...quot;SPINYTAIL","BIGELOW'S","SKATES (NS)","THORNY","SMOOTH","ABYSSAL","LITTLE","DEEPWATER","JENSEN'S","WHITE","SOFT")) +
ylab("Abundance (fish/tow)") + coord_flip() +
theme_bw() + opts(axis.title.x = theme_text(size = 10)) + opts(panel.grid.minor = theme_blank()) + opts(legend.position='none') )
(b<-ggplot(Final2, aes(x=spp, y=WPUE, fill=season)) +
geom_bar(position=position_dodge()) +
geom_errorbar(aes(ymin=WPUE-wpue.se, ymax=WPUE+wpue.se),...
2018 Jan 14
2
consolidate three function into one
...;blue")
legend.labs <- c("Cluster1", "Cluster2", "Cluster3", "Cluster4")
}
ggsurvplot(cluster, data = inputfile, risk.table = F,
palette = palette,
ylim=c(0,1),ggtheme = theme_bw(),xlab="Relapse Free Suvival (Days)",
main = "Survival curve",pval = TRUE,font.x = 16,font.y = 16,
font.tickslab = 14,font.legend =c(14,"plain","black"),
legend = "bottom",
legend.title = "Tr...
2008 Sep 10
1
ggplot2: edge outlines on points
...n trying to overlay two plots of the same points,
one plotted with fills and the other plotted with edge outlines (here
is my conceptual code):
pfill <- ggplot(data=DF, aes(x=X, y=Y)) +
geom_point(aes(colour=TRT),size=4) +
scale_colour_grey(end=0.8) +
theme_bw
pedge <- ggplot(data=DF, aes(x=X, y=Y)) +
geom_point(aes(colour=TRT),size=4) +
scale_colour_grey(end=0.8) +
scale_shape(solid=FALSE) +
theme_bw
However, I can't figure out the correct syntax, if this is even the
right way to go about it...
2018 Jan 15
2
consolidate three function into one
...;,"green", "blue")
legend.labs <- c("Cluster1", "Cluster2", "Cluster3", "Cluster4")
}
fig <-ggsurvplot(cluster, data = inputfile, risk.table = F,
palette = palette,
ylim=c(0,1),ggtheme = theme_bw(),xlab="Relapse Free Suvival (Days)",
main = "Survival curve",pval = TRUE,font.x = 16,font.y = 16,
font.tickslab = 14,font.legend =c(14,"plain","black"),
legend = "bottom",
legend.title = "T...
2018 Jan 14
0
consolidate three function into one
...legend.labs <- c("Cluster1", "Cluster2", "Cluster3", "Cluster4")
> }
>
> ggsurvplot(cluster, data = inputfile, risk.table = F,
> palette = palette,
> ylim=c(0,1),ggtheme = theme_bw(),xlab="Relapse Free Suvival (Days)",
> main = "Survival curve",pval = TRUE,font.x = 16,font.y = 16,
> font.tickslab = 14,font.legend =c(14,"plain","black"),
> legend = "bottom",
> leg...
2023 Aug 02
2
Choosing colours for lines in ggplot2
...lour=Stat))+
coord_cartesian(ylim = c(0, 10)) +
geom_line()+
geom_point()
## this works
## BUT:
## code 2
col.2<-cb8[4:5]
ggplot(df,aes(Year,Flow,group=Stat,colour=Stat))+
coord_cartesian(ylim = c(0, 10)) +
geom_line()+
geom_point()+
scale_color_manual(values =cb8[4:5])+
theme_bw()
## this gives error message Error: Continuous value supplied to discrete
scale
## However this example using code from the net does work so I don't
understand why my ## second code doesn't work.
## code 3
df.1 <- data.frame(store=c('A', 'A', 'A', 'B',...
2012 Jun 27
3
qplot and colors (Please Help)
...heme for race but dont know how, can someone show me.
Thanks in advance
Code and input file below:
library(ggplot2)
library(gridExtra)
d<-read.table("results", header=TRUE, fill=TRUE)
plot2<-qplot(X,Y,data=d,color=race,facets=TYPE~., xlab="X", ylab="Y") + theme_bw()
grid.arrange(plot2,ncol=1)
dev.off()
cat? results
<snip>
X?????? Y?????? ID????? race??? TYPE
0.0350? 0.0200??? 1??? X??? NA
0.0280? 0.0251??? 2??? X??? NA
0.0258? 0.0175????3??? Y??? NA
</snip>
2018 Jan 15
0
consolidate three function into one
...ue")
> legend.labs <- c("Cluster1", "Cluster2", "Cluster3", "Cluster4")
> }
>
>
> fig <-ggsurvplot(cluster, data = inputfile, risk.table = F,
> palette = palette,
> ylim=c(0,1),ggtheme = theme_bw(),xlab="Relapse Free Suvival
> (Days)",
> main = "Survival curve",pval = TRUE,font.x = 16,font.y = 16,
> font.tickslab = 14,font.legend =c(14,"plain","black"),
> legend = "bottom",
>...
2010 Apr 27
1
ggplot2 - help with intervals in geom plot
...lour for 0-10, next shade for 10-30, next for 30-70
etc.
Due to some magic done on the data, one uses intervals 0,50,100,150 and
the other 0,20,40 etc. - not important but I would be interested to know
why. My plots are created by;
ggplot(DiffMod,aes(binL,binR,fill=HProbCount)) + geom_tile() +
theme_bw() + scale_fill_gradient(low="white",high="red")
ggplot(DiffMod,aes(binL,binR,fill= HCount)) + geom_tile() + theme_bw() +
scale_fill_gradient(low="white",high="red")
I can get the intervals right in the legend using;
ggplot(DiffMod,aes(binL,binR,fill=HPr...
2012 Nov 07
1
change colour of geom_step by scale_colour_manual
...15)) +
scale_colour_discrete(name ="Group",
breaks=c("ace", "ctrlAM","met"),
labels=c("acetone",
"untreated","methoprene"))+
theme_bw() + # maek background theme
black and white
opts(legend.justification=c(1,0),# legend
justification needs to be in the (options)
legend.position=c(1,0),
panel.grid.major...
2018 Jan 15
1
consolidate three function into one
...quot;,"green", "blue")
legend.labs <- c("Cluster1", "Cluster2", "Cluster3", "Cluster4")
}
fig <-ggsurvplot(cluster, data = inputfile, risk.table = F,
palette = palette,
ylim=c(0,1),ggtheme = theme_bw(),xlab="Relapse Free Suvival (Days)",
main = "Survival curve",pval = TRUE,font.x = 16,font.y = 16,
font.tickslab = 14,font.legend =c(14,"plain","black"),
legend = "bottom",
legend.title = "Tr...
2010 Dec 06
2
ggplot2: Controlling line width of panel borders
...D)
p1 <- ggplot(barley,aes(fill=year,y=yield,x=variety))
p2 <- p1 + geom_bar(position="dodge",stat="identity")
dodge <- position_dodge(width=0.9)
p3 <- p2 + geom_errorbar(limits,position=dodge,width=0.5,size=0.7)
p4 <- p3 + facet_wrap(~site,ncol=2)
p5 <- p4+theme_bw(base_size=16)
p5
last_plot() + opts(panel.grid.minor=theme_blank()) # deletes the minor grid
lines
## Now i would like to increase the width of all remaining lines (bottom,
left, top, right border of all panels and stripes) in the plot, as a
certain minimum lines width is required by many jo...
2011 Jul 07
1
Confidence bands in ggplot2
...er.95ci and upper.95ci. Presently I am doing the following:
qplot(x=as.factor(sch),y=lower.95ci) + geom_point(aes(x=as.factor(sch),y=upper.95ci),colour="black") + geom_point(aes(x=as.factor(sch), y=est),colour="red") + ylab("Value-Added") + xlab("School") + theme_bw()
Which creates this graph ---> http://dl.dropbox.com/u/1501309/value_added_test.pdf
That's fine except that it doesn't connect the points vertically. Does anyone know how I could make the 'black' points connect to the 'red' point, i.e. show confidence bands?
Thanks,...
2018 Jan 14
0
consolidate three function into one
...{
cluster2<- survfit(Surv(RFS_days, OV_Had_a_Recurrence_CODE) ~ clusters,
data = inputfile)
ggsurvplot(cluster2, data = inputfile, risk.table = F,
palette = c("red", "black"),
ylim=c(0,1),
ggtheme = theme_bw(),
xlab="Relapse Free Suvival (Days)",
main = "Survival curve",
pval = TRUE,
font.x = 16,
font.y = 16,
font.tickslab = 14,
font.legend =c(14,"plain","black"),...