search for: ggopt

Displaying 10 results from an estimated 10 matches for "ggopt".

2007 Jun 17
1
[ggplot2] Change color of grid lines
...white background. No problem, I thought, "This is R. There is no if. Only how." (fortune("Simon Blomberg")). I carfully checked the ggplot2 homepage <http://had.co.nz/ggplot2/> and the ggplot2 book <http://had.co.nz/ggplot2/book.pdf>. It seemed that the use of ggopt would be a good idea, in particular grid.colour. library(ggplot2) x <- rnorm(100) y <- rnorm(100) ## the default behaviour (a <- qplot(x,y)) ## my attempt to change the default behaviour ggopt(grid.colour = "black", grid.fill = "white", background.colour = "bla...
2008 Apr 04
1
How to access the attributes of a ggplot?
Hi, I am having some hard time figuring how to access (and modify) the properties of an object created by ggplot. I found 'ggopts', but it only returns some of the properties. Say I want to get the x- and y-axis limits, the tickmark locations, legend current position, the legend box and background color and set them to new values. Are these properties easily accessible (and modifiable) from the object? Here is an exam...
2008 Apr 29
1
ggplot2: setting global graphic parameters with png driver
...g images. I couldn't find a way to change it globally. So, is there a way to go easily from a plot that looks good on screen (X11 driver) to a similar png image? Or is it possible to change the default settings of ggplot2 (line size and font size in particular, which are not covered by the ggopt function) ? I guess people usually export their charts as image files, so hopefully there's an easy solution. Many thanks, Xavier
2006 Dec 11
1
two ggplot and colour=x question
Hi I am using ggplot with the aesthetic=list(..., colour=x, ...) ggplot() ggline() I have four different values in x ("ren", "cyn", "mixed", "bare") and I have two questions 1) I would like to assign specific colours to the values, i.e. green, red, blue and brown. How can I do this? I did not understand map_colour_brewer. 2) I don't want the
2007 Jun 05
1
ggplot aspect ratio
Is there a way to control the aspect ratio of plots using ggplot? Specifically, I'm using the formula=a~b argument to produce a grid of plots, but the overall width of the result seems to vary for reasons that are obscure to me. This affects not only the appearance of the plots but the amount of space available for the title (which seems to be right justified relative to the right edge of the
2008 Jan 26
2
using facet_grid() from ggplot2 with additional text in labels
Hi I am using ggplot2 at the moment and I must say it is definitely better then ggplot - good work. My problem is that I am using facet_grid() in the following way: > p <- ggplot(ssq, aes(x=year, y=-log(ssq))) > p + geom_point() + facet_grid(me*gi~cs*rz) and it works nicely, except that I would like to have, in naddition to the values of me, gi, cs and rz the name of the variable.
2008 Apr 07
3
rgl_0.70.553.tar.gz install
Hi, I am an R beginner and wish to create some 3d plots. I have managed to install the rgl library and save 3d plots, but only as an R file. I wish to use rgl.snapshot so I can create a ".png" file and the plot can be used in LaTex. The function rgl.snapshot does not work (i get an error "failed" message). Having looked at previous posts, I believe that the problem can sorted
2006 Aug 02
4
ggplot facet label font size
How do I change the font size in the facet labels along the edges of the plot? For example (from the ggplot help file): p<-ggplot(tips, sex ~ smoker, aesthetics=list(x=tip/total_bill)) gghistogram(p) In this plot, the facet labels are "smoker: No", "smoker: Yes", "sex: Female", "sex: Male". What command can I use to reduce the font size of
2007 Jun 24
2
matlab/gauss code in R
...gt; [ ]10 worst > > > > I don't know if this is possible, but it would be nice to explain what > > the colors/values might mean if it's not clear from the beginning > > (ligke diamonds.size). The only thing I found was the attribute > > legend.justifcation in ggopt, which isn't fully documented. > > The legends aren't very customisable at the moment - look at the > examples for the scale functions to see what you can do. You can see > the name of the title easily, and you can change the labels by > changing the level of the factors, or...
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame. For instance > ddTable <- data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry")) I want a dataset that is Id Name 1 Paul 2 Bob > unique(ddTable) Will give me all 4 rows, and > unique(ddTable$Id) Will give me c(1,2), but not accompanied by the name column.