similar to: background color behind symbols in legend()

Displaying 20 results from an estimated 11000 matches similar to: "background color behind symbols in legend()"

2008 Dec 22
0
Align legend title
Dear R developers, I needed to align the title of legend for some of my plots. If there is interest to include this into base R, bellow are the examples and the relevent diffs. Regards, Gregor x <- 1:10 y1 <- 1.5 * x y2 <- 2.0 * x y <- cbind(y1, y2) source(file=url("http://gregor.gorjanc.googlepages.com/legend.R")) matplot(x, y, type="l", lty=c(1, 2)) ##
2008 Nov 18
1
legend color problems
Hello R-folks, I don't get the color of the legend in a lattice-plot right. I select a palette from RColorBrewer and use it in the barchart plot. The resulting graph shows the new palette in the graph, but in the legend rectangles the standard palette is used. Adding a col argument into auto.key uses the new palette with the legend text, but not in the rectangle fill. What am I missing?
2008 Nov 20
1
Repost:lattice graphics -- legend color problems
Hello R-folks, I don't get the color of the legend in a lattice-plot right. I select a palette from RColorBrewer and use (with a col = mypalette argument) it in the barchart plot. The resulting graph shows the new palette in the graph, but uses the standard palette in the legend rectangles. Adding a col argument into auto.key uses the new palette with the legend text, but not in the
2006 Dec 22
3
multiline system call
Hello, I am trying to call sendmail from within R via system(). As sendmail reads from STDIN, I need to pass a multiline input as an argument. E.g. (not working): system('sendmail -f xxx at swing.be -t yyy at swing.be\ntest\n.\n') I tried a lot of ways to type the EOL characters, but cannot get them work the right way. This leads to several problems. For instance, R waits for me to
2009 Jun 18
2
Hatched symbols
Hello, I would like to build rectangles in a plot and use color and different type of hatching for filling rectangles. I don't find the way to draw hatchings. I'm thinking to build segment by segment inside each rectangle but I'm sure that exists a better way to do that. I didn't find any documentation about that. > symbols(1,1,rectangles=cbind(1,1),bg="red", ...
2007 Jan 24
2
modify rectangle color from image
Hi, I need some suggestion on how I could modify the color on some rectangle that I have created using "image". In other words, I have a 5x5 matrix, say, m. m <- matrix(rnorm(25), nrow=5) I create a grid of rectangles by: image(m) Now I want to change the color of rectangle (3,3) to blue. I don't know how this could be done, and searching the web has
2009 Apr 14
1
Lattice xyplot: Line and Rectangle in legend.
Hello fellow R users, I have a problem. I have created a barchart overlayed by an xyplot line, both of which read off the same Y axis. The problem comes when I try to generate a key. It seems that I can only create either two lines, or two rectangles. I would much prefer to have the barchat series depicted by a rectangle, and the xyplot series by a line. Is there a way to do this? Your help
2006 Dec 15
1
xyplot: legend title + legend on 1 line
Does anybody know how in xyplot to put the legend title on one line with the legend? I can get the legend on one line with columns=... but the title is always on top. I tried a custom key with key=... and text=... but I can't put the title text in front of the plotting symbol. I am looking for the following layout of the legend, on one line: "Legend Title:" + plot symbol1 + legend
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",
2012 May 21
1
simple, unidimensional heat map
I was wondering if someone could point in the direction of a package that could generate not heatmaps, but something like a unidimensional heat map. I might be mistaken, but it seems like image and heatmap are an overkill for such a simple task. For example, if I have a data frame: x<-data.frame(myname=paste("value",1:10,sep=""),a=1:10,b=sample(1:10,10,replace=T)) I'd
2007 Aug 02
1
Background color of symbols in xyplot
Dear R-users, I am using plot symbols given by pch=21:25 in a xyplot. The background color of these symbols can be defined by 'fill' in the panel argument, however I have a hard time to find how to define the same background color in the key. I tried different options like using the auto.key argument and modifying the par.settings, or using normal key argument plus 'fill',
2009 Oct 26
1
regular expressions
Dear list, I have the following text to parse (originating from readLines as some lines have unequal size), st = c("START text1 1 text2 2.3", "whatever intermediate text", "START text1 23.4 text2 3.1415") from which I'd like to extract the lines starting with "START", and group the subsequent fields in a data.frame in this format: text1 text2
2006 Mar 02
0
Combining plaintext and plotmath expressions
I searched the archives and did not find a solution, so I pose this question to those well-versed in the use of plotmath and expressions. I have a list of strings in an external CSV file which I wish to use sometimes as plot axis labels and sometimes as plot titles. These strings combine plaintext and a few mathematical expressions (Greek letters, subscripts). Moreover, I sometimes need to
2012 Feb 14
4
Color cells of a matrix as in Excel
All, I frequently make spreadsheets in Excel in which I rank values in columns by stop-light colors (red is bad, yellow is OK, green is good). Image and heatmap expect a matrix in which all the data are in the same scale, but I frequently have different scales in different columns. ie. Column one runs from 1-10 while column 2 runs from 1-100. I thus need to define a separate color ramp for each
2006 Mar 30
0
symbols plot
before getting scolded for submitting a (non-)bug report: when using the 'symbols' function for plotting boxplot data (i.e. using 'boxplots' symbols), I noted that the x/y-position of the symbols is associated with the center of the box. while this is obviously natural for a usual plotting symbol (say a circle or a rectangle), it is probably never desired if one uses the
2006 Mar 30
0
symbols plot
before getting scolded for submitting a (non-)bug report: when using the 'symbols' function for plotting boxplot data (i.e. using 'boxplots' symbols), I noted that the x/y-position of the symbols is associated with the center of the box. while this is obviously natural for a usual plotting symbol (say a circle or a rectangle), it is probably not desired if one uses the
2009 Sep 04
2
transforming a badly organized data base into a list of data frames
Dear R-ers! I have a badly organized data base in Excel. Once I read it into R it looks like this (all variables become factors because of many spaces and other characters in Excel):
2013 Jan 27
2
Unexpected behavior with abbreviation of an argument to paste
R 2.15.1 OS X Colleagues, I encountered the following unexpected behavior today: The following command yielded the expected result: paste(c("TEXT1", "TEXT2"), collapse="|") Result: [1] "TEXT1|TEXT2" However, abbreviating "collapse" by even one character: paste(c("TEXT1", "TEXT2"), collaps="|") yielded the
2005 Apr 14
2
Legend in xyplot two columns
Dear R-Help I have some trouble to set the legend in a xyplot into two rows. The code below gives me the legend in the layout I am looking for, I just rather have it in two rows. library(lattice) schluessel <- list( points=list( col="red", pch=19, cex=0.5 ), text=list(lab="John"), lines=list(col="blue"),
2009 Sep 06
1
struggling with "split" function
I am very sorry for such a simple question, but I am struggling with "split". I have the following data frame: x<-data.frame(A=c(NA,NA,NA,NA,"split",NA,NA,NA,NA,"split",NA,NA,NA,NA,"split",NA,NA,NA,NA),