Displaying 20 results from an estimated 4000 matches similar to: "ggplot2: recommended workaround for broken legend.position="top""
2009 May 27
5
How to exclude a column by name?
Given an arbitrary data frame, it is easy to exclude a column given its index:
df[,-2]. How to do the same thing given the column name? A naive attempt
df[,-"name"] did not work :)
2009 May 05
2
problem with ggplot2 boxplot, groups and facets
I have a following problem:
The call
qplot(wg, v.realtime, data=df.best.medians$gv1, colour=sp, geom="boxplot")
works nice: for each value of the wg factor I get two box-plots (two levels in
the sp factor) in different colours, side-by-side, centered at the wg x-axis.
However, I want to separate the data belonging to different levels of the n
factor, so I add the facets option:
2009 May 12
2
From two colors to 01 sequences
Dear All,
Perhaps, what I am asking is impossible, but I am asking it anyway.
I have got several pdf files with rows of colored rectangles: red
rectangles should be read as 0; green rectangles as 1. No other color
exists. Is there some way to have R reading the colored rectangles to
a matrix or data frame converting the color of the rectangles to
sequences of 01?
Thanks in advance,
Paul
2009 May 26
1
Selection and aggregation in one operation?
I have a large data-frame with measurements such as:
id i v1 v2 v3
1 1 1.1 1.2 1.3
1 2 1.4 1.5 1.6
1 3 1.5 1.7 1.8
2 1 2.1 2.2 2.3
2 2 2.7 2.5 2.6
2 3 2.4 2.8 2.9
For each unique value of 'id' (which in the real data-set is a combination of
three variables) I want to compute the median of v1 within each group ('i'
distinguishes measurements within a group), and copy the
2009 Jan 24
2
ggplot2 - how to change location / position of wind rose axis labels?
Dear R users,
First just want to say thank you to all for developing such a wonderful
software and packages.
I need to produce a wind rose plot. Tried with packages circular and plotrix
and couldn't quite get what I want. Moved to package ggplot2 and it's going
great. However stuck in how to move axis labels.
I am using the wind rose from the help to learn how to do what I need (code
2009 May 01
2
Reccomendation for graphics package
Hello,
What would you recommend for producing publication-quality plots with R?
Built-in graphics, trellis, ggplot2, or something else?
Basic requirements:
- I need to draw line-, box-, density-plots, bar-charts and histograms
- error bars on bar- and box-plots
- easy tiling of multiple plots on a single "page"
Basic R plotting with mfrow and mfcol parameters is not satisfactory
2009 May 04
2
Calculating relative ratios in a data frame..
I have a data-set that is structured as follows:
sp wg n v.realtime v.cputime v.tcputime v.idletime v.nswtch
9 0 1 1 28.61300 28.61 28.6039 0.00000e+00 407
1563 0 1 2 15.20270 30.38 28.5981 9.80523e-01 483
3128 0 1 4 12.50930 50.00 28.6053 1.07877e+01 489
4682 0 1 6 12.10260 72.55
2009 Jun 01
1
ggplot2: How to export several plots with same width?
I have three plots and I want the *plot area* to be of the same width on
each plot. Since the three plots have different legends, the text width
of the legend affects the width of the plot area (longer legend text =
narrower plot area). Exporting the three figures to postscript device
of same size gives thus unequal plot areas. How can I calculate the
correct width of postscript device for each
2009 May 03
7
running R on netbooks/minis?
Dear R People:
Is it possible to run R on a netbook/mini, please?
Thanks,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodgess at gmail.com
2010 Dec 06
2
ggplot2: Controlling line width of panel borders
Dear R-users,
i encountered some problems when trying to adjust the line width of the
axes and stripes in a plot created with ggplot2.
I use the "barley" dataset of the lattice package to illustrate my problem:
library(ggplot2)
library(lattice)
barley[["SD"]] <- 5
limits <- aes(ymax=barley$yield + barley$SD,ymin=barley$yield - barley$SD)
p1 <-
2009 Dec 11
1
ggplot: Problem with legend background
Dear R-users,
I am preparing graphs for an upcoming article using the different functions
of the ggplot2 package and I've been having problems with the legend
background. It doesn't seem to scale when the text size is increased. Here's
the mandatory reproducible example:
library(ggplot2)
repFrame <- data.frame(A= 1:10, B= rnorm(1:10), groupNum = rep(c("First
group",
2009 May 21
1
postscript problems (landscape orientation)
I use the following function to export some figures to .eps:
p.eps <- function(p, fname, title = NULL, width, height)
{
postscript(file=fname, onefile=FALSE, paper="special",
width=width, height=height, horizontal=FALSE)
print(p + opts(title = title))
dev.off()
}
Whenever I have a page consisting of *only* figures exported in this way,
Acrobat Reader shows them in
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
I'm having problems with this example, it is posted with reproduceable code
below, both with the normal 0-6 scale and the desired 3-6 scale (with bars
removed). How can I get the graph to have the desired 3-6 scale without
removing the bars. Thanks!
#Data
2010 Jun 07
1
Patch for legend.position={left,top,bottom} in ggplot2
Hi Hadley and everyone,
here's a patch for ggplot2 that fixes the behavior of
opts(legend.position={left,top,bottom}). If you try the following code
in an unmodified ggplot2
options(warn = -1)
suppressPackageStartupMessages(library("ggplot2"))
data <- data.frame(
x = c(1, 2, 3, 4, 5, 6),
y = c(2, 3, 4, 3, 4, 5),
colour = c(TRUE, TRUE, TRUE, FALSE, FALSE, FALSE))
2010 Feb 03
1
color blending and transparency
I am using ggplot and posted this question at that helplist. It was
suggested that I try a more general R-help list for a possible solution to
this problem.
Within ggplot, I am using geom_area with red and blue and expect where they
overlap should be purple. But instead, it's dark red.
Playing with alpha and with different colors doesn't seem to solve the
problem.
Here's a very
2009 Jun 01
1
installing sn package
Hi r-users,
I want to use the sn package but I got the following message:
> install.packages(repos=NULL,pkgs="c:\\Tinn-R\\sn_0.4-12.zip")
Warning: package 'sn' is in use and will not be installed
updating HTML package descriptions
I did tried to do it a few times but it gives the same message.
________________________________
From:
2008 Nov 24
1
ggplot2: positioning legend on top of plot
Hi,
With ggplot2 v0.8, how do I position a legend on top of the plot. Things
like
p + opts(legend.position="top")
work ok. But
p + opts(legend.position=c(0.5,0.5))
gives
Error in as.character(x) :
cannot coerce type 'closure' to vector of type 'character'
so obviously I should be giving a string instead but I can't figure out
what it should be.
Thanks,
2015 Aug 17
2
Front page
Hello,
i need permision to create Serbian Front Page.
Thanks,
Zeljko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos-docs/attachments/20150817/f72d4adc/attachment-0002.html>
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]]