similar to: Placing the legend 'dynamically'

Displaying 20 results from an estimated 5000 matches similar to: "Placing the legend 'dynamically'"

2009 Jun 26
3
Automatically placing a legend in an area with the most white space...
At one point I believe I heard of an R package that would automatically find the most empty space in a plot, and then that answer could then be used to intelligently place a legend. I would like to try to apply that R package to the contrived example shown below, so thank you for any hints or tips that can be provided. x = seq(0, 1000, by = 1) y1_vals<-rnorm(1000, mean = 0, sd = 50)
2010 Feb 15
2
Printing 2 digits after decimal point
Hi there, i'm not getting along with the following problem. I'd like to print a real number, e.g. x <- 12.3 with exactly two digits after the decimal point, e.g. 12.30 I've tried the whole format(), formatC() and prettyNum() functions but did not have any success with it. This should work with all real numbers, in case even with 0.0 (-> 0.00). For cracks this thing is pretty
2008 Jul 08
6
Automatic placement of Legends
Dear R-Users, I am looking for a way to get legends placed automagically in an empty spot on a graph. Additional complication comes through my useage of multiple graphs on the same plot through mfrow. Is there a way to achieve this in R ? I have legends for each of the sub-plots. Many thanks in advance, Tolga Generally, this communication is for informational purposes only and it is not
2007 Oct 19
1
unable to interactively label curves on a plot
Hello all Simple question for the gurus. I'm trying to interactively label curves on a single plot. The labcurve() function from Hmisc seems like the way to do this (?). I just can't seem to get it to work. Toy example: > x <- 1:10 > y1 <- x^2 > y2 <- 2*x > plot(x,y1) > lines(x,y2) > labcurve(labels=c("curve1", "curve2"),
2010 Mar 01
1
file reading /problems with encoding
Hello, I'm a little frightened because of a problem that occured lately as I tried to read in a xml-file (for replacing some variables in the string with values from a data frame). The almost biggest problem is the encoding of the xml-file. Since it is generated by Word 2007 its encoding is UTF-8 (as to see in the xml-header). Now I'm establishing a file connection with >
2007 Apr 28
1
Hmisc curve label size & cex
R-Masters, I need to produce high resolution line plots and place labels on the curves. It seems that cex must be high relative to the other cex values in order to produce sufficiently large & legible tick labels at high resolutions. But high cex values cause the curve labels to become gigantic when using Hmisc. I've struggled and searched the archives, but cannot find a way of
2003 Oct 05
3
Placing legends
I'm trying to automate making a bunch of figures and I need a way to automate legend position. As I understand it the legend is placed based on coordinates. I don't know before hand what the coordinates are going to be. On one graph my y axis might go from -50 to -10. On another it might go from 0 to 180. Is there any way to query where the origin is? Or is there another way to
2013 Nov 19
1
como agrego una linea dibujada con abline() en la leyenda de un grafico ?
Estimado Eric En Hmisc la función labcurve puede ser útil, en todos casos crear una curva con valores constantes, habría que intentar, pero labcurve en algunos ejemplos en mi computadora no anda. Ayer envié dos correos, el primero era de latticeextra, usted nombra lattice, pero podría funcionar, en latticeextra: ## horizontal and vertical lines xyplot(ysim ~ xsim) + layer(panel.ablineq(v
2003 Jun 05
2
Fwd: Re: legend() with option adj=1
Is there a simpler way then the solution to the one that was posted here? I'm not very proficient with legend, and I don't understand this solution. All I have is two or more lines on one plot that I want to put a legend on and I can't figure out how to do it from the examples. Can you give a very simple example? It does not have to be fancy!! I have never worked with a
2011 Feb 08
2
Frequency plot --- stacked symbols
Hi, We were wondering how we could make a stacked frequency diagram such as this one: http://msemac.redwoods.edu/~darnold/math15/liz.pdf We don't necessarily need the shaded "balls", other characters would be fine, such as stacks of x's. David
2008 Oct 17
1
Using key.opts in Ecdf/labcurve (Hmisc package)
I'm presumably missing something very obvious, but how does one use the key.opts argument in labcurve (via Ecdf)? In this example, I want the key to be big and have a blue background, but it isn't and doesn't. ch <- rnorm(1000, 200, 40) sex <- factor(sample(c('female','male'), 1000, TRUE)) Ecdf(~ch, group=sex, label.curves=list(keys=c("f",
2011 Aug 17
9
too many var in lm
Hello, It might be an easy question but if you have many variables to fit in the lm function, how do you take all without specifying var1+var2+...+var2100 in the terms parameter in response ~ terms? Cheers, Carol
2011 Apr 27
2
ROCR for combination of markers
Dear list   I have 5 markers that can be used to detect an infection in combination. Could you please advise me how to use functions in ROCR/ other package to produce the ROC curve for a combination of markers?   I have used the following to get ROC statistics for each marker. pred <- prediction(y$marker1, y$infectn) perf <-performance(pred,"tpr","fpr")
2009 Aug 12
2
Superscripts in axis label
Hi All, I am trying to lable the y-axis on my scatterplot with the following: "Soil moisture content (m3m-3)" I am using the following coding for plotting the graph: plot(soilmoisture~gradientlevel, xlab="Levels of droughting gradient", ylab="Soil moisture content (m3m-3)", bty="l", font.main="2", pch=16, las=1, cex.lab="1.13") I have
2011 Oct 22
7
"Plotting" text?
I noticed that the text() command adds text to a plot. Is there a way to either make the plot blank or add text to a "blank sheet". I would like to "plot" a page that contains just text, no plot lines, labels, etc. Suggestions? Kevin [[alternative HTML version deleted]]
2012 Aug 02
6
Polygon shaded area
Hi all, I have two vectors (columns) called "efinal" and "efinal 2". I want to plot them on the same plot and "draw" a shaded area beween the two lines using function polygon I have tried all but I don ?t understand the polygon area, can you help me with examples? plot(efinal,type="l",ylim=range(min(efinal2),
2011 Oct 10
3
How to test if two C statistics are significantly different?
Hey all, In order to test if a marker is a risk factor, I built two models (using cox proportional hazard model). One model included this marker, and the other is not. Then, I use R package risksetROC to test how much predictive value did the marker add to this model. I get two C statistics by analyzing the linear predictors of the two models into this package. The qustion is How to test if two
2011 Jul 13
1
Smart legend ???
Hi, all: Is there an automatic smart legend for R? Since my R code is running in a row, which will produce a bunch of R plots in a single run, some of the produced plots are really "ridiculous". Because my legend is fixed to "topleft", sometimes, which occludes the key parts of the figure/plots, but most of the time, the legend works just fine. I'm wondering is there a
2011 Aug 17
3
Obtaining variable's names from a list of variables
Say I have a list of variables,  listVar <- list(age,sex) I am looking for a way to either 1- create a vector c("age","sex") from it, or 2- get the names one by one in a for loop such as these     a)  for (i in 1:length(listVar)) rownames(result)[i] <- ???     b)  for(i in listVar) print (variable's name) Any help much appreciated. [[alternative HTML version
2011 Jul 28
3
construct a data set
Hi, i want to construct a data set similar to "AirPassengers". Its attributes are following. > attributes(AirPassengers) $tsp [1] 1949.000 1960.917 12.000 $class [1] "ts" How Can I construct a data set similar to it having same class and attributes. Thanks -- Amar Kumar Nandan ?:nandan.amar at gmail.com http://aknandan.co.nr