Displaying 18 results from an estimated 18 matches for "theme_rect".
2009 Jan 24
2
ggplot2 - how to change location / position of wind rose axis labels?
...st = 1), axis.text.y = theme_blank(),
axis.ticks = theme_segment(colour = "black",
size = 0.2), axis.title.x = theme_blank(), axis.title.y =
theme_blank(), axis.ticks.length = unit(0,
"lines"), axis.ticks.margin = unit(0, "lines"), legend.background =
theme_rect(colour = NA),
legend.key = theme_rect(colour = "grey80"), legend.key.size =
unit(1.2,
"lines"), legend.text = theme_text(size = base_size *
0.8), legend.title = theme_text(size = base_size *
0.8, face = "bold", hjust = 0)...
2009 Mar 05
1
is there any option like cex.axis in ggplot2?
Dear list,
I made boxplots using ggplot and want to control for x- and yaxis. Using "plot" I can do it by setting cex.axis equally to any size but can't figure out how to do it with ggplot.
ggplot(dat, aes(x = factor(time), y = volume)) + opts(axis.title.x=theme_text(size=8),axis.title.y=theme_text(size=8)) +
geom_boxplot() + geom_jitter(aes(colour = id))+labs(x =
2010 Jun 30
2
ggplot qplot bar removing bars when truncating scale
...h=2,ylab=NULL,xlab=NULL,width=.75)
#With 0-6 Scale
p + scale_x_discrete(expand=c(0,0)) +
scale_y_continuous(limits=c(0,7),breaks=seq(from=0,to=6,by=.5),expand=c(0,0))
+
coord_flip() +
scale_fill_manual(values=c("darkmagenta","lightgoldenrod1")) +
opts(
panel.background = theme_rect(colour = NA),
panel.background = theme_blank(),
panel.grid.minor = theme_blank(),
axis.title.x= theme_blank(),
axis.title.y= theme_blank(),
axis.text.y=theme_text(size=12,hjust=1),
legend.text=theme_text(size=14)
)
#With 3-6 Scale (Bars Deleted)
p + scale_x_discrete(expand=c(...
2009 May 10
1
ggplot2: recommended workaround for broken legend.position="top"
...d.position as in
p.ring.3 + opts(legend.position="top")
is a known bug. I tried doing
p.ring.3 + opts(legend.position=c(0.8, 0.2))
which works, but the legend background is transparent, i.e. I see the
plot background through the legend. Adding additional option
opts(legend.background=theme_rect(fill=TRUE,colour="white"))
fills the whole rectangle black(!), making text invisible, but leaves the shape
symbols visible.
So, how can I obtain a graph with legend positioned within the plot boundaries
(that's OK, I don't even mind manually positioning the legend), but on a whi...
2010 Dec 06
2
ggplot2: Controlling line width of panel borders
...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 journals
last_plot() +
opts(panel.grid.major=theme_line(colour="darkgrey",size=0.71))
# that works fine
last_plot() + opts(panel.border=theme_rect(colour="black",size=0.71))
# that only changes the bottom and right border of the panel
last_plot() +
opts(strip.background=theme_rect(colour="black",fill="grey90",size=0.71))
# that only changes the bottom and right border of the stripes
last_plot() + opts(axis.line=...
2011 Nov 16
1
geom_bar with missing data in package ggplot
Dear all,
I was hoping someone could help with a ggplot question. I would like
to generate a faceted bar chart, but missing data are causing
problems.
g<-structure(list(Date = structure(c(11322, 11687, 12052, 11322,
11687, 12052, 11322, 11687, 12052, 11322, 11687, 12052), class = "Date"),
variable = c("Govt Revenues to GDP", "Govt Revenues to GDP",
2010 Feb 03
1
color blending and transparency
...z<-c(1,2,3,4)
a<-data.frame(pos=z, y=y, x=x)
ex<- ggplot(data=a, aes(pos)) +
geom_area(aes(y = y),fill="navyblue", alpha = 0.7, position="identity") +
geom_area(aes(y = x), fill= "darkred", alpha = 0.7,position="identity" ) +
opts(panel.background = theme_rect(fill = "white"))
ex
Likewise, with blue and yellow, I would expect overlap to be green.
Are there any solutions to this that would allow color overlaps to lead to
the "expected" color?
Thank you.
> sessionInfo()
R version 2.10.0 (2009-10-26)
x86_64-apple-darwin9.8.0
local...
2009 Dec 11
1
ggplot: Problem with legend background
...andatory reproducible example:
library(ggplot2)
repFrame <- data.frame(A= 1:10, B= rnorm(1:10), groupNum = rep(c("First
group", "Second group"),each=5))
testPlot <- ggplot(repFrame, aes(x=A, y = B, group = groupNum)) +
opts(legend.position=c(0.85,0.3), legend.background =
theme_rect(fill="white"), legend.text=theme_text(size=16),
legend.title=theme_text(size=20))
testPlot + geom_point(aes(colour= groupNum))
As you can see, the text doesn't fit in the white rectangle. I suspect there
is a theme setting I could modify to fix this, but I can't seem to find
whic...
2009 Aug 19
1
ggplot2 transparent pdf
Hi,
I plotted a histogram using ggplot2 and saved it as a pdf.However, the
portions outside the histogram dont appear transparent when I use a
non-white bg colour in my latex document.What can I do to make them
transparent?
--
Rajesh.J
[[alternative HTML version deleted]]
2012 Jun 28
0
neatmap - draw.dendrogram - help!
...ns I get a tree pointing in the right direction
but without leaf labels i.e. no species names.
ggplot()+draw.dendrogram(gen.hc, leaf.order=NULL, dendro.dir = "right")+
opts(panel.grid.major = theme_line(size = 0, colour = NA), panel.grid.minor
= theme_line(colour = NA), panel.background = theme_rect(colour = NA),
axis.title.y = theme_blank(), axis.title.x = theme_blank(), axis.text.x =
theme_blank(), axis.text.y = theme_blank(),axis.ticks = theme_blank())
Any ideas from gurus welcomed!
Regards,
Mikey
--
View this message in context: http://r.789695.n4.nabble.com/neatmap-draw-dendrogram-help...
2011 Jul 12
1
problem plotting points based on different values
Hello Friends,
I am new to R and stuck with a problem.
i have two columns drug_A and drug_B, i have plotted a scatter plot
using the ggplot2 function.
My problem is with the third column, it is the p-value column.
I want to color and size points differently based on the p_value, the
p_value range is between 0<0.0001< 0.001<0.05<1.
I used a script using the ifelse loop, but it
2010 Sep 10
3
ggplot bar geom: control the filling in the colour legend
Hi all,
Is it possible to change the filling of the squares used to represent
the colour legend in a bar plot with ggplot?
in this example, fillings are raven black, I'd like them white.
ggplot(diamonds, aes(clarity, colour = cut)) + geom_bar()
Regards
--
-------------
Benoit Boulinguiez
Ph.D student
Ecole de Chimie de Rennes (ENSCR) Bureau 1.20
Equipe CIP UMR CNRS 6226 "Sciences
2008 Nov 21
0
ggplot2 - version 0.8
...h yet another new output format from quantreg
* stat_contour now has arguments to control the position of the
contours, rather than relying on the z scale
* theme: panel.empty setting removed as it is no longer used
* theme_grey now aliased to theme_gray
* theme_line: setting size works correctly
* theme_rect, theme_segment: size now measured in mm, to be consistent
with the rest of ggplot
Regards,
Hadley
--
http://had.co.nz/
_______________________________________________
R-packages mailing list
R-packages at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-packages
2008 Nov 21
0
ggplot2 - version 0.8
...h yet another new output format from quantreg
* stat_contour now has arguments to control the position of the
contours, rather than relying on the z scale
* theme: panel.empty setting removed as it is no longer used
* theme_grey now aliased to theme_gray
* theme_line: setting size works correctly
* theme_rect, theme_segment: size now measured in mm, to be consistent
with the rest of ggplot
Regards,
Hadley
--
http://had.co.nz/
_______________________________________________
R-packages mailing list
R-packages at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-packages
2011 Oct 21
1
lattice::xyplot/ggplot2: plotting weighted data frames with lmline and smooth
In the HistData package, I have a data frame, PearsonLee, containing
observations on heights of parent and child, in weighted form:
library(HistData)
> str(PearsonLee)
'data.frame': 746 obs. of 6 variables:
$ child : num 59.5 59.5 59.5 60.5 60.5 61.5 61.5 61.5 61.5 61.5 ...
$ parent : num 62.5 63.5 64.5 62.5 66.5 59.5 60.5 62.5 63.5 64.5 ...
$ frequency: num 0.5 0.5
2011 Jun 02
2
shading in overlap between two ranges
I have 2 datafiles 'target' and 'observed' as shown below (I will gladly
email these 2 small files to whomever). X25. And X75. Indicate the
value of 25th and 75th-percentile of the target ('what should be') and
the observed ('what is'). The i.value is simply the month.
> target
X i.value X25. X75.
1 one.month 1 10.845225 17.87237
2
2010 Apr 19
2
plotting RR, 95% CI as table and figure in same plot
Hi all--
I am in the process of helping colleagues write up a ms in which we fit
zero-inflated Poisson models. I would prefer plotting the rate ratios
and 95% CI (as I've found Gelman and others convincing about plotting
tables...), but our journals usually like the numbers themselves.
Thus, I'm looking at a recent JAMA article in which both numbers and
dotplot of RR and 95% CI are
2012 Aug 27
2
Font size in geom_dl (using ggplot2)
Hey everyone,
I am an R-newby... so sorry for bothering you with simple-to-solve
questions;) I have the following issue: trying to add labels to my
scatterplots (with geom_dl in ggplot2). Everything works fine, but after
checking every resource I do not find a way to change the font size of my
labels. I tried size, cex, fontsize at every position... but it always stays
the same.
ggplot()+