search for: scale_fill_identity

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

2008 Apr 29
2
ggplot2: labels and breaks order does not match and I can't use scale_fill_identity
...) f1 contains quite a few levels and the plot is really quite difficult to read when the order of bars on the graph and on the legend does not match. This problem has been discussed recently here: http://www.nabble.com/ggplot2---legend-for-fill-coulours-td16235166.html and the solution was to use scale_fill_identity to manually define the order of both the breaks and the labels. This is however unsuitable for me (at least in the unmodified form), as this is part of a script that does not know in advance how many levels there arae in f1. Is there a way round this problem? Many thanks Mikhail Spivakov Mikhail...
2008 Sep 17
1
ggplot2 - deprecated guide= argument in
In the help for scale_fill_identity, it is written ## Not run: colour <- c("red","green","blue","yellow") qplot(1:4, 1:4, fill=colour, geom="tile") qplot(1:4, 1:4, fill=colour, geom="tile") + scale_fill_identity() # To get a...
2008 May 12
1
Converting qqplot2 qplot() to grammar?
Hello all, I've been using the following qplot command: qplot(pixX,pixY, data=som, geom="tile", fill=rgb) + scale_fill_identity() + opts(aspect.ratio = .75) + facet_grid(unitX ~ unitY) Now I would like to convert it into the explicit ggplot grammar, so I can remove the extras: axes, labels, background, borders, facet labels, and extra white-space around the plot. (If anyone has suggestions on removing these please let me k...
2008 Feb 21
2
jpeg() creating empty files with qplot() in a loop
...step]]) dev.off() } But if I use qplot to generate the plot (which is my aim): for (step in 1:length(steps)) { jpeg(filename=paste("frame_",sprintf("%05d",step),".jpg",sep="")) qplot(x, y, data=steps[[step]], geom="tile", fill=rgb(V1,V2,V3)) + scale_fill_identity() + opts(aspect.ratio = .75) dev.off() } I end up with a directory of empty files named correctly. The following does work: step <- 10 jpeg(filename=paste("frame_",sprintf("%05d",step),".jpg",sep="")) qplot(x, y, data=steps[[step]], geom="tile&quo...
2008 Feb 05
2
using image to show RGB image data ?
Hello all, I'm now using image() to show image data (in my case dumps of SOM weights) but would like to show RGB colour data, not just single "z" colour values. I've currently been using seq() to skip 4 values, so I can show the R, G or B channels separately as "z". But is there a way I can show all three channels simultaneously as a proper colour image? Thanks, B.
2008 Mar 23
2
ggplot2 - legend for fill coulours
...grey90" > as.numeric(plotdata2$group) [1] 2 2 1 4 2 3 3 4 3 1 4 2 4 3 1 1 Code: plot0<-ggplot() layer1<-layer(data=plotdata2, mapping=aes_string(x='x',y='y', fill='group'),geom='bar', stat='identity', position='stack') scaleFill<-scale_fill_identity(labels=levels(plotdata2$group), guide='tile', name='Group') scaleY<-scale_y_continuous(limits=c(0,4), expand=c(0,0)) plot1<-plot0+layer1 +scaleFill +scaleY plot1
2008 Jan 27
1
Putting frame around single panels in ggplot 2 and facet_grid()
Hi I want to highlight two panels in a grid created with facet_grid() by putting a box around it or usiong another background colour. Is this possible, and if yes, how? Thanks Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South Africa Tel: +27 - (0)21 650 5776 (w) Fax:
2010 Jan 27
1
color matrix
Hi, Is it possible to create a heatmap for say a 3x3 matrix of data where every color is pre-assigned? I can easily create a matrix of hex colors but when I try to use that matrix as the parameter for the 'col' option it doesn't work. If it's possible to just display a matrix of hex colors that would work as well thanks -- View this message in context:
2012 May 10
0
Fwd: Re: need help in R
...cannot open the connection > In addition:Warning message: > In readChar(con, 5L, useBytes = TRUE) : > > i dont have a problem here > ggplot()+ > geom_tile(aes(x = lon, y = lat, fill = fill), data = GGemz)+ > geom_jitter(aes(x=lon,y=lat, color=fieldworker),data=emz)+ > scale_fill_identity()+ > scale_x_continuous('Longitude', limits = lon_range) + > scale_y_continuous('Latitude', limits = lat_range) + > scale_colour_discrete('') + > opts(title = 'Invitation map of Emzinini, 2012') + > coord_equal() > > this code brings an...
2007 Jun 24
2
matlab/gauss code in R
...e name of the colors? Thanks so much in advance! > > Really neat package you've made. > > > > FYI, my plot command now looks like this: > > > > p = ggplot(y, aes(x=locus, y=Freq, fill=color)) > > p = p + geom_bar(position="fill") > > p = p + scale_fill_identity(labels=levels(y$Fnd), grob="tile", name="Fnd > > Results") > > p = p + coord_flip() > > > > And the data table is similar as before: > > > > > y > > Fnd locus Freq color > > 1 signeg DPB1 0.013071895 gray1 >...