[R] Legend issue with ggplot2

2007-09-03 Thread ONKELINX, Thierry
Dear useRs, I'm struggling with the new version of ggplot2. In the previous version I did something like this. But now this yield an error (object fill not found). library(ggplot2) dummy - data.frame(x = rep(1:10, 4), group = gl(4, 10)) dummy$y - dummy$x * rnorm(4)[dummy$group] + 5 *

Re: [R] Legend issue with ggplot2

2007-09-03 Thread hadley wickham
On 9/3/07, ONKELINX, Thierry [EMAIL PROTECTED] wrote: Dear useRs, I'm struggling with the new version of ggplot2. In the previous version I did something like this. But now this yield an error (object fill not found). library(ggplot2) dummy - data.frame(x = rep(1:10, 4), group = gl(4, 10))

Re: [R] Legend issue with ggplot2

2007-09-03 Thread ONKELINX, Thierry
] Verzonden: maandag 3 september 2007 15:15 Aan: ONKELINX, Thierry CC: r-help@stat.math.ethz.ch Onderwerp: Re: [R] Legend issue with ggplot2 On 9/3/07, ONKELINX, Thierry [EMAIL PROTECTED] wrote: Dear useRs, I'm struggling with the new version of ggplot2. In the previous version I did

Re: [R] Legend issue with ggplot2

2007-09-03 Thread hadley wickham
conducted, is a delicate dissection of uncertainties, a surgery of suppositions. ~M.J.Moroney -Oorspronkelijk bericht- Van: hadley wickham [mailto:[EMAIL PROTECTED] Verzonden: maandag 3 september 2007 15:15 Aan: ONKELINX, Thierry CC: r-help@stat.math.ethz.ch Onderwerp: Re: [R

[R] Legend on graph

2007-08-13 Thread Nguyen Dinh Nguyen
Hi Akki, Then you may need to increase y-axis scale by ylim=c(min,max) Cheers Nguyen On 8/12/07, akki [EMAIL PROTECTED] wrote: Hi, I have a problem when I want to put a legend on the graph. I do: legend(topright, names(o), cex=0.9, col=plot_colors,lty=1:5, bty=n) but the legend is writen

Re: [R] Legend on graph

2007-08-13 Thread Bert Gunter
To: [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Subject: [R] Legend on graph Hi Akki, Then you may need to increase y-axis scale by ylim=c(min,max) Cheers Nguyen On 8/12/07, akki [EMAIL PROTECTED] wrote: Hi, I have a problem when I want to put a legend on the graph. I do: legend(topright, names

[R] Legend on graph

2007-08-12 Thread akki
Hi, I have a problem when I want to put a legend on the graph. I do: legend(topright, names(o), cex=0.9, col=plot_colors,lty=1:5, bty=n) but the legend is writen into the graph (graphs' top but into the graph), because I have values on this position. How can I write the legend on top the graph

Re: [R] Legend on graph

2007-08-12 Thread jim holtman
If you are asking to have the values plotted on top of the legend, then you can do the following: plot(x, y, type='n', ...) # create plot, but don't plot legend('topright', ...) lines(x,y) # now plot the data If you want it outside the plot, check the archives for several examples. On 8/12/07,

[R] legend()

2007-07-31 Thread amna khan
Hi Sir How can I use legend() outside th e plot. Please guid in this regard. Thanks -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. Email: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch

Re: [R] legend()

2007-07-31 Thread Marc Schwartz
On Tue, 2007-07-31 at 10:21 -0700, amna khan wrote: Hi Sir How can I use legend() outside th e plot. Please guid in this regard. Thanks Create a plot, specifying outer margins to make space for the legend. Then move the legend to the open region. # Set 'xpd' to NA so that the legend is not

Re: [R] legend and x,y cordinate values

2007-07-13 Thread Adaikalavan Ramasamy
See help(legend) and help(identify). Ajay Singh wrote: Hi, I have two problems in R. 1. I need 10 cdfs on a graph, the graph needs to have legend. Can you let me know how to get legend on the graph? 2. In ecdf plot, I need to know the x and y co-ordinates. I have to get

[R] legend and x,y cordinate values

2007-07-12 Thread Ajay Singh
Hi, I have two problems in R. 1. I need 10 cdfs on a graph, the graph needs to have legend. Can you let me know how to get legend on the graph? 2. In ecdf plot, I need to know the x and y co-ordinates. I have to get corresponding y coordinate values to x coordinate value so that I could be

[R] legend and lend (line end style)

2007-06-22 Thread Camarda, Carlo Giovanni
Dear R-users, would you know a nice way to use the command lend in the legend? The following code gives you a really simple example and a inefficient workaround. Thanks in advance for any suggestion. Best, Giancarlo plot(c(1,1), lwd=15, lend=2, t=l) lines(c(0.8, 0.8), lwd=15, lend=1, col=2,

[R] legend + expression

2007-06-08 Thread Pedro Mardones
Dear all; A simple? question. I'm having a problem with a math expression in the legend of a plot and I haven't found the way to get this to work, so any help will be appreciate. Basically I want to include in the plot is the R-squared and its numerical value, so I tried this: R2c-0.82879 #

Re: [R] legend + expression

2007-06-08 Thread Peter Ruckdeschel
what about legend(topleft, legend = bquote( R[c]2 == .(format(R2c,nsmall=2)) ) ) HTH, Peter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] legend + expression

2007-06-08 Thread Marc Schwartz
On Fri, 2007-06-08 at 17:27 -0400, Pedro Mardones wrote: Dear all; A simple? question. I'm having a problem with a math expression in the legend of a plot and I haven't found the way to get this to work, so any help will be appreciate. Basically I want to include in the plot is the

Re: [R] Legend outside plotting area

2007-05-29 Thread S Ellison
Judith, Haven't tried it in anger myself, but two things suggest themselves. The first is to use the lattice package, which seems to draw keys (autokey option) outside the plot region by default. Look at the last couple of examples in ?xyplot. May save a lot of hassle... In classical R

Re: [R] Legend outside plotting area

2007-05-23 Thread J . delasHeras
Quoting Judith Flores [EMAIL PROTECTED]: Hi, I have been trying many of the suggested options to place a legend outside plotting area, including something like this: par(xpd=T, oma=par()$oma+c(4.5,0,1.5,0),mar=par()$mar+c(1,0,1,0) But the aspect of the four plots gets

[R] Legend outside plotting area

2007-05-22 Thread Judith Flores
Hi, I have been trying many of the suggested options to place a legend outside plotting area, including something like this: par(xpd=T, oma=par()$oma+c(4.5,0,1.5,0),mar=par()$mar+c(1,0,1,0) But the aspect of the four plots gets compromised when I change the margin settings. I cannot

Re: [R] Legend outside plotting area

2007-05-22 Thread Vladimir Eremeev
RSiteSearch(legend outside plot) will bring you many links to the discussions of this question. layout perfectly allows everything. typical sequence looks like this This divides the device region by two parts one below another: layout(matrix(c(1,2),byrow=TRUE), heights=[blah-blah-blah], [some

Re: [R] Legend outside plotting area

2007-05-22 Thread Carsten Jaeger
Judith, you might try split.screen() and related functions, see ?screen. Example: split.screen(c(1,2)) # 1 row, 2 columns split.screen(c(2,2), screen = 1) # split left column into 2x2 for(i in 3:6) { screen(i); plot(1:10) } screen(2) plot(1, type=n, axes=F, ann=F) # empty plot legend(center,

[R] legend with mixed boxes and lines (not both)

2007-05-14 Thread Michael Toews
Hi, I seem to be unable to get a mixed legend that has lines *or* polygons (not both). For example: ppi - seq(0,2*pi,length.out=21)[-21] frame() plot.window(ylim=c(-5,5),xlim=c(-5,5),asp=1) polygon(cos(ppi)*4+rnorm(20,sd=.2),sin(ppi)*4+rnorm(20,sd=.2), col=green,border=FALSE)

Re: [R] legend with mixed boxes and lines (not both)

2007-05-14 Thread Marc Schwartz
On Mon, 2007-05-14 at 18:13 -0700, Michael Toews wrote: Hi, I seem to be unable to get a mixed legend that has lines *or* polygons (not both). For example: ppi - seq(0,2*pi,length.out=21)[-21] frame() plot.window(ylim=c(-5,5),xlim=c(-5,5),asp=1)

[R] legend with density and fill

2007-03-17 Thread Simon Pickett
Hi, I am trying to make a legend with four symbols as follows 1.white box 2.black box 3.clear box (same as background) 4.clear box with shading lines but the shading lines arent showing... here is my code. par(bg=lightyellow) barplot(c(seq(1,6,1))) legend(8.5,0.3, bty=o,

Re: [R] legend with density and fill

2007-03-17 Thread Andrew Robinson
Hi Simon, Try fill=c(white,dark grey,black,black), density=c(NA,NA,25,75), etc Cheers Andrew On Sat, Mar 17, 2007 at 12:36:19PM +, Simon Pickett wrote: Hi, I am trying to make a legend with four symbols as follows 1.white box 2.black box 3.clear box (same as background)

Re: [R] legend question

2007-03-01 Thread John Kane
? par it is the xpd you're looking for. x - seq(-pi, pi, len = 65) par(xpd=TRUE) plot(x, sin(x), type=l, col = 2,xpd=NA) legend(x = 0, y = -1.5, legend text, pch = 1, xjust = 0.5) --- Jenny Barnes [EMAIL PROTECTED] wrote: Hi folks, Do you mind if I ask a related question that I have

[R] legend question

2007-02-28 Thread Emili Tortosa-Ausina
Hi to all, I'm sorry for posting this question, I am sure I am missing something important but after reading the documentation I cannot find where the problem is. I want to add a legend to a figure. If I use a simple example drawn from the R Reference Manual such as, for instance: x -

Re: [R] legend question

2007-02-28 Thread Ranjan Maitra
On Wed, 28 Feb 2007 17:06:18 +0100 Emili Tortosa-Ausina [EMAIL PROTECTED] wrote: y-c(1960, 1965, 1970, 1975) z-c(1, 2, 3, 4) plot(y, z, type=l, col = 2) legend(x = -3, y = .9, legend text, pch = 1, xjust = 0.5) your x and y are outside the plotting area. try using a different set, or

Re: [R] legend question

2007-02-28 Thread Stephen Tucker
Hi Emili, Even though you are calling your horizontal coordinate y, and vertical coordinate z, the first and second arguments to legend(), namely x and y, should be the horizontal and vertical coordinates, respectively; and they are given in user coordinates (e.g., legend()'s x should be between

Re: [R] legend question

2007-02-28 Thread jim holtman
try: y-c(1960, 1965, 1970, 1975) z-c(1, 2, 3, 4) plot(y, z, type=l, col = 2) legend(topleft, legend text, pch = 1, xjust = 0.5) On 2/28/07, Emili Tortosa-Ausina [EMAIL PROTECTED] wrote: Hi to all, I'm sorry for posting this question, I am sure I am missing something important but after

Re: [R] legend question

2007-02-28 Thread Jenny Barnes
Hi folks, Do you mind if I ask a related question that I have been having trouble with - how do you put the legend outside of the plot area (to the bottom of the area - below the x-axis title)? Could anybody show me using the example given below: x - seq(-pi, pi, len = 65) plot(x, sin(x),

Re: [R] legend question

2007-02-28 Thread Sebastian P. Luque
On Wed, 28 Feb 2007 16:52:05 + (GMT), Jenny Barnes [EMAIL PROTECTED] wrote: Hi folks, Do you mind if I ask a related question that I have been having trouble with - how do you put the legend outside of the plot area (to the bottom of the area - below the x-axis title)? Could anybody show

Re: [R] legend in lattice densityplot [Broadcast]

2007-02-15 Thread Deepayan Sarkar
Vilella Sent: Wednesday, February 14, 2007 8:46 AM To: R-help@stat.math.ethz.ch Subject: Re: [R] legend in lattice densityplot [Broadcast] How can I place the legend to the left or right of the densityplot? By default, it goes at the top, and as it is a rather long list, the density plot

Re: [R] legend in lattice densityplot

2007-02-14 Thread Albert Vilella
How can I place the legend to the left or right of the densityplot? By default, it goes at the top, and as it is a rather long list, the density plot only uses half the space of the whole graphic... On 11/30/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Me too on Windows XP. Its probably

Re: [R] legend in lattice densityplot [Broadcast]

2007-02-14 Thread Wiener, Matthew
be one of top, bottom, left and right. Hope this helps, Matt Wiener -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Albert Vilella Sent: Wednesday, February 14, 2007 8:46 AM To: R-help@stat.math.ethz.ch Subject: Re: [R] legend in lattice densityplot

Re: [R] legend in lattice densityplot [Broadcast]

2007-02-14 Thread Albert Vilella
, bottom, left and right. Hope this helps, Matt Wiener -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Albert Vilella Sent: Wednesday, February 14, 2007 8:46 AM To: R-help@stat.math.ethz.ch Subject: Re: [R] legend in lattice densityplot [Broadcast

Re: [R] legend in lattice densityplot [Broadcast]

2007-02-14 Thread Rene Braeckman
this helps. Rene -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Albert Vilella Sent: Wednesday, February 14, 2007 6:50 AM To: Wiener, Matthew Cc: R-help@stat.math.ethz.ch Subject: Re: [R] legend in lattice densityplot [Broadcast] I am defining the legend

[R] legend font

2007-02-14 Thread Tyler Smith
Hi, I'd like to make the text in my legends italic, but I can't figure out how to do so. font=3 doesn't work. Googling brings up the possibility of expression(italic()), which produces italics, but I can't get this to work with my label data, which is a vector of strings: legend(locator(1),

Re: [R] legend font

2007-02-14 Thread Duncan Murdoch
On 2/14/2007 1:32 PM, Tyler Smith wrote: Hi, I'd like to make the text in my legends italic, but I can't figure out how to do so. font=3 doesn't work. Googling brings up the possibility of expression(italic()), which produces italics, but I can't get this to work with my label data, which

Re: [R] legend font

2007-02-14 Thread Tyler Smith
On Wed, Feb 14, 2007 at 02:40:47PM -0500, Duncan Murdoch wrote: On 2/14/2007 1:32 PM, Tyler Smith wrote: Hi, I'd like to make the text in my legends italic, ... How can I do this? This should work: plot(1,1) savefont - par(font=3) legend(topright, legend=c('Label 1', 'Label 2'),

Re: [R] legend font

2007-02-14 Thread Duncan Murdoch
On 2/14/2007 3:12 PM, Tyler Smith wrote: On Wed, Feb 14, 2007 at 02:40:47PM -0500, Duncan Murdoch wrote: On 2/14/2007 1:32 PM, Tyler Smith wrote: Hi, I'd like to make the text in my legends italic, ... How can I do this? This should work: plot(1,1) savefont - par(font=3)

[R] Legend function

2007-02-13 Thread amna khan
Dear Sir Lengend add a bix containing plot discription in the existing plot. Is there any function which decribe the lines in a plot outside the existing plot? I have also a question related to following statement. In this statement * is used for plot discription. If we have plotted type=o of

[R] legend/plotmath/substitute problem

2006-12-14 Thread Philipp Pagel
Dear R Experts, I am trying to produce a legend for a series of plots which are generated in a loop. The legend is supposed to look like this: 2000: gamma=1.8 where gamma is replaced by the greek letter and both the year and the value of gamma are stored in variables. Everything works

Re: [R] legend/plotmath/substitute problem

2006-12-14 Thread Duncan Murdoch
On 12/14/2006 5:05 PM, Philipp Pagel wrote: Dear R Experts, I am trying to produce a legend for a series of plots which are generated in a loop. The legend is supposed to look like this: 2000: gamma=1.8 where gamma is replaced by the greek letter and both the year and the value

Re: [R] legend/plotmath/substitute problem

2006-12-14 Thread Philipp Pagel
On Thu, Dec 14, 2006 at 06:25:49PM -0500, Duncan Murdoch wrote: On 12/14/2006 5:05 PM, Philipp Pagel wrote: My problem starts, when I want to put more than one series of data in the plot and accordingly need one legend row per data series: year1 = 2001 year2 = 2005 g1 = 1.9 g2 = 1.7

Re: [R] legend in lattice densityplot

2006-11-30 Thread Albert Vilella
Can I combine colors and line types? For example, would it be possible to have 5 colors per 2 types of lines (continuous and dashed)? On 11/29/06, Chuck Cleland [EMAIL PROTECTED] wrote: Albert Vilella wrote: Are this legend colors correlated to the plot? They are if you rely on the colors

Re: [R] legend in lattice densityplot

2006-11-30 Thread Chuck Cleland
Albert Vilella wrote: Can I combine colors and line types? For example, would it be possible to have 5 colors per 2 types of lines (continuous and dashed)? Yes. Using Gabor's suggestion of changing the trellis settings within the call to densityplot(), try something like this: x -

Re: [R] legend in lattice densityplot

2006-11-30 Thread Gabor Grothendieck
Yes by using the lty suboption of superpose.line. Here is a modification of the prior example to illustrate: We also use lwd as well in this example. set.seed(1) DF - data.frame(x = c(rnorm(100,1,2),rnorm(100,2,4),rnorm(100,3,6)), f = sample(c(A,B,C,D,E),300,replace=TRUE))

Re: [R] legend in lattice densityplot

2006-11-30 Thread Albert Vilella
Should it be a problem to print this dashed line plots as svgs? library(RSvgDevice) devSVG(file = /home/avilella/file01.svg, width = 20, height = 16, bg = white, fg = black, onefile=TRUE, xmlHeader=TRUE) densityplot(...) dev.off() I am getting all the lines as continuous, not

Re: [R] legend in lattice densityplot

2006-11-30 Thread Gabor Grothendieck
Me too on Windows XP. Its probably just a bug or unimplemented feature in the SVG driver. Write to the maintainer of that package For a workaround generate fig output and then convert it to svg using whatever fig editor or converter you have. (On my windows system I use the free fig2dev

[R] legend in lattice densityplot

2006-11-29 Thread Albert Vilella
Hi, I have a densityplot like this: x = c(rnorm(100,1,2),rnorm(100,2,4),rnorm(100,3,6)) f = sample(c(A,B,C,D,E),300,replace=TRUE) df=data.frame(x,f) library(lattice) attach(df) densityplot(~x, groups=f) And I want to add a legend with the colours for the factors. How can I do that? How can I

Re: [R] legend in lattice densityplot

2006-11-29 Thread Chuck Cleland
Albert Vilella wrote: Hi, I have a densityplot like this: x = c(rnorm(100,1,2),rnorm(100,2,4),rnorm(100,3,6)) f = sample(c(A,B,C,D,E),300,replace=TRUE) df=data.frame(x,f) library(lattice) attach(df) densityplot(~x, groups=f) And I want to add a legend with the colours for the

Re: [R] legend in lattice densityplot

2006-11-29 Thread Albert Vilella
Are this legend colors correlated to the plot? If I do a: densityplot(~x, groups=f, plot.points=FALSE, auto.key=TRUE,col=heat.colors(5)) I get different colors in the legend than the plot... On 11/29/06, Chuck Cleland [EMAIL PROTECTED] wrote: Albert Vilella wrote: Hi, I have a

Re: [R] legend in lattice densityplot

2006-11-29 Thread Gabor Grothendieck
Try specifying it at the par.settings= level since that is where both the plot and the legend get it from: set.seed(1) DF - data.frame(x = c(rnorm(100,1,2),rnorm(100,2,4),rnorm(100,3,6)), f = sample(c(A,B,C,D,E),300,replace=TRUE)) library(lattice) densityplot(~ x, DF, groups = f, auto.key

Re: [R] legend in lattice densityplot

2006-11-29 Thread Chuck Cleland
Albert Vilella wrote: Are this legend colors correlated to the plot? They are if you rely on the colors in trellis.par.get(superpose.line)$col If you want different colors you might use trellis.par.set() to temporarily change the colors: x -

[R] legend positioning problems

2006-11-13 Thread Schweitzer, Markus
Hello, I have several Barplots I want to plot. I also want to include a legend. Since my Barplots are very different I ve dicided to put the legend in the top left corner. Unfortunately, sometimes there is a part of a bar just below the legend. This makes it difficult to see the legend itself

[R] legend problems in lattice

2006-09-07 Thread Ernst O Ahlberg Helgee
Hi! Im sorry to bother you but I cant fix this. I use the lattice function levelplot and I want the colorkey at the bottom, how do I get it there? I have tried changing colorkey.space and changing in legend but I cant get it right, plz help btw I'd like to speceify strings to appear at the tick

Re: [R] legend problems in lattice

2006-09-07 Thread Sundar Dorai-Raj
Ernst O Ahlberg Helgee wrote: Hi! Im sorry to bother you but I cant fix this. I use the lattice function levelplot and I want the colorkey at the bottom, how do I get it there? I have tried changing colorkey.space and changing in legend but I cant get it right, plz help btw I'd like to

[R] Legend box line thickness

2006-08-29 Thread Philip Turk
I am making a plot and am merely trying to increase the line thickness, or width, of the box drawn around the legend. The help page on 'legend' was of no use. Does anyone have any ideas? [[alternative HTML version deleted]] __

[R] Legend box line thickness

2006-08-28 Thread Phil Turk
I am merely trying to increase the line thickness, or line width, of the box drawn around the legend in a plot I am constructing. The help page on 'legend' was of no use. Does anyone have an idea on how to do this? Please respond to [EMAIL PROTECTED] Thanks!

Re: [R] Legend box line thickness

2006-08-28 Thread Marc Schwartz
On Mon, 2006-08-28 at 17:55 -0700, Phil Turk wrote: I am merely trying to increase the line thickness, or line width, of the box drawn around the legend in a plot I am constructing. The help page on 'legend' was of no use. Does anyone have an idea on how to do this? Please respond to

[R] legend on trellis plot

2006-08-09 Thread Henrik Agersø
Dear all I have two questions regarding trellis plots - which I hope you may be able to help me with. Is it possible to place the key in a trellis plot on the panel (instead of beside the panel)? This will cause the same key to be reproduced on each panel. Please see the plot below - here I

Re: [R] legend on trellis plot

2006-08-09 Thread Gabor Grothendieck
1. Use the x, y and corner components to the key= list to specify the legend position, and 2. pass the panel.number in the panel function and test that as shown in the panel function below. Alternately you can place the horizontal line on afterwards using

[R] legend outside plotting area

2006-07-12 Thread Georg Otto
Hi, I would like to place a legend outside a plotting area. Could anybody give me a hint how this is done? Cheers, Georg __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] legend outside plotting area

2006-07-12 Thread Joris De Wolf
see http://finzi.psych.upenn.edu/R/Rhelp02a/archive/68585.html Georg Otto wrote: Hi, I would like to place a legend outside a plotting area. Could anybody give me a hint how this is done? Cheers, Georg __ R-help@stat.math.ethz.ch mailing

[R] legend with filled boxes AND lines

2006-07-03 Thread florian . koller
Dear all, Is there a straightforward way to create a legend box that has both filled boxes and lines? So far I have built around this problem by creating two legends (with bty = n) and manually drawing a box around both (but this is cumbersome, because I have to check upon the y coordinates of

Re: [R] legend with filled boxes AND lines

2006-07-03 Thread Martin Maechler
Did you try legend(.., lty=..., fill=..., merge = TRUE) ? In an example I just tried, this allowed to give filled boxes *and* lines. Please give a reproducible example of what you did -- maybe by modifying one of the many example(legend) examples. Martin Maechler, ETH Zurich florian

[R] legend title in effects plot

2006-05-24 Thread Viktor Tron
Could someone tell how I can change/remove the legend title in a (multiline) effect plot? Thanks V In general, how is one supposed to find out answers to such questions? It is virtually impossible to keep track of what graphical parameters are passed on to which low level function and which

Re: [R] Legend titles in log plots broken? (ver. 2.2.1)

2006-05-11 Thread Duncan Murdoch
I forgot to mention: if you want to use the patch without installing a new version of R, it's available by sourcing the file https://svn.r-project.org/R/branches/R-2-3-patches/src/library/graphics/R/legend.R It was just a one character change: Index: legend.R

[R] Legend titles in log plots broken? (ver. 2.2.1)

2006-05-10 Thread Rob Steele
Legend titles work in linear plots: curve(1/x, xlim = c(0, 1)) legend(x = 'topright', inset = 0.04, legend = '1/x', lty = 1, title = 'Legend Title') But when you change to a log plot on either dimension things get screwy: curve(1/x, xlim = c(0, 1), log = 'y') legend(x =

Re: [R] Legend titles in log plots broken? (ver. 2.2.1)

2006-05-10 Thread Duncan Murdoch
Rob Steele wrote: Legend titles work in linear plots: curve(1/x, xlim = c(0, 1)) legend(x = 'topright', inset = 0.04, legend = '1/x', lty = 1, title = 'Legend Title') But when you change to a log plot on either dimension things get screwy: curve(1/x, xlim = c(0, 1),

[R] Legend in the outer margin

2006-04-10 Thread Prasanna
Dear Rs I have a 3x3 multiple plot. I would like to have a overall legend in the outer right margin. From the help archive, I found that it can be done by setting par(xpd=NA). However, I couldn't find the correct values for x and y co-ordinates for the legend. Please find the code snippet below:

Re: [R] Legend in the outer margin

2006-04-10 Thread Uwe Ligges
Prasanna wrote: Dear Rs I have a 3x3 multiple plot. I would like to have a overall legend in the outer right margin. From the help archive, I found that it can be done by setting par(xpd=NA). However, I couldn't find the correct values for x and y co-ordinates for the legend. Please find

Re: [R] Legend in the outer margin

2006-04-10 Thread Dieter Menne
Uwe Ligges ligges at statistik.uni-dortmund.de writes: You get the user coordinates of the plotting region by par(usr) Now simply make the legend right of that plotting region, e.g. with x corrdinates at par(usr)[2] + epsilon and y coordinates at mean(par(usr)[3:4]) I always

Re: [R] Legend in the outer margin

2006-04-10 Thread Greg Snow
Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dieter Menne Sent: Monday, April 10, 2006 7:40 AM To: r-help@stat.math.ethz.ch Subject: Re: [R] Legend in the outer margin Uwe Ligges

[R] legend in bubble plots made with symbols()

2006-03-18 Thread Denis Chabot
Hi, I have read about the use of symbols() to draw circles of different sizes, but I have not been able to find out how to add a legend to such a graph, legend that would display some specific sizes and their meaning. Before finding the symbols function in Paul Murrell's book, I had

Re: [R] legend in bubble plots made with symbols()

2006-03-18 Thread Frank E Harrell Jr
Denis Chabot wrote: Hi, I have read about the use of symbols() to draw circles of different sizes, but I have not been able to find out how to add a legend to such a graph, legend that would display some specific sizes and their meaning. Before finding the symbols function in Paul

Re: [R] legend in bubble plots made with symbols()

2006-03-18 Thread Roger Bivand
On Sat, 18 Mar 2006, Denis Chabot wrote: Hi, I have read about the use of symbols() to draw circles of different sizes, but I have not been able to find out how to add a legend to such a graph, legend that would display some specific sizes and their meaning. Before finding the

[R] Legend in a HeatMap

2006-02-14 Thread Akkineni,Vasundhara
List, Is it possible to add a color legend to a heatmap , similar to the one in levelplot and filled.contour plot. The legend will represent the colors used in the heatmap along with values for each color range. Can this be done? Please help. Thanks, Svakki.

Re: [R] Legend Outside Plot Dimension

2006-01-19 Thread Petr Pikal
: Thu, 19 Jan 2006 12:19:30 -0800 Subject:[R] Legend Outside Plot Dimension Dear All, I'm trying to attach a legend outside the plot (Inside plot OK), but failed. Any help is very much appreciated. Thanks. Abd. Rahman Kassim, PhD Forest Management Ecology

Re: [R] Legend Outside Plot Dimension

2006-01-19 Thread Abd Rahman Kassim
Dear Peter, Thanks for your promt response. Abd. Rahman - Original Message - From: Petr Pikal [EMAIL PROTECTED] To: Abd Rahman Kassim [EMAIL PROTECTED]; r-help@stat.math.ethz.ch Sent: Thursday, January 19, 2006 12:11 AM Subject: Re: [R] Legend Outside Plot Dimension Hi I

[R] Legend Outside Plot Dimension

2006-01-18 Thread Abd Rahman Kassim
Dear All, I'm trying to attach a legend outside the plot (Inside plot OK), but failed. Any help is very much appreciated. Thanks. Abd. Rahman Kassim, PhD Forest Management Ecology Program Forestry Conservation Division Forest Research Institute Malaysia Kepong 52109 Selangor MALAYSIA

Re: [R] Legend Outside Plot Dimension

2006-01-18 Thread Jacques VESLOT
use xpd argument in par(), as follows: ?par par(xpd=T, mar=par()$mar+c(0,0,0,4)) plot(1,1) legend(1.5,1,point,pch=1) Abd Rahman Kassim a écrit : Dear All, I'm trying to attach a legend outside the plot (Inside plot OK), but failed. Any help is very much appreciated. Thanks. Abd.

Re: [R] Legend Outside Plot Dimension

2006-01-18 Thread Abd Rahman Kassim
Dear Jacques, Thanks for the promt response. Abd. Rahman - Original Message - From: Jacques VESLOT [EMAIL PROTECTED] To: Abd Rahman Kassim [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Sent: Wednesday, January 18, 2006 9:15 PM Subject: Re: [R] Legend Outside Plot Dimension use xpd

[R] Legend

2005-11-13 Thread Mark Miller
I use the following to plot two graphs over each other and then insert a legend, but the two items in the legend both come up the same colour x = seq(0,30,0.01) plot(ecdf(complete), do.point=FALSE, main = 'Cummlative Plot of Monday IATs for Data and\n Fitted PDF over Entire 15 Weeks') lines(x,

Re: [R] Legend

2005-11-13 Thread Sundar Dorai-Raj
Mark Miller wrote: I use the following to plot two graphs over each other and then insert a legend, but the two items in the legend both come up the same colour x = seq(0,30,0.01) plot(ecdf(complete), do.point=FALSE, main = 'Cummlative Plot of Monday IATs for Data and\n Fitted PDF over

Re: [R] Legend

2005-11-13 Thread Adaikalavan Ramasamy
And you want to have different colored lines but black texts, try legend(x = 5, y = 0.2, legend = c(Data Set, Fitted PDF), col = c(black, red), lty=1) The advantage of this is that you can use dotted (lty option) or lines with different weights (lwd option). Regards, Adai On Sun,

[R] Legend out of Plot Region

2005-09-24 Thread Michel Friesenhahn
Hi, Could someone tell me how to place a legend outside the plot region? Thanks, Mike __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Legend out of Plot Region

2005-09-24 Thread Romain Francois
Le 24.09.2005 20:22, Michel Friesenhahn a écrit : Hi, Could someone tell me how to place a legend outside the plot region? Thanks, Mike Hi Mike, Take a look at : R par(xpd=NA) -- visit the R Graph Gallery : http://addictedtor.free.fr/graphiques

[R] legend

2005-06-22 Thread Thomas Steiner
I color some area grey with polygon() (with a red border) and then I want to have the dashed red border in the legend as well. How do I manage it? And I want to mix (latex) expressions with text in my legend. Just execute my lines below and you know want I mean. Or pass by at

Re: [R] legend

2005-06-22 Thread Uwe Ligges
Thomas Steiner wrote: I color some area grey with polygon() (with a red border) and then I want to have the dashed red border in the legend as well. How do I manage it? And I want to mix (latex) expressions with text in my legend. Both points are not that easy to solve, hence I'd like to

Re: [R] legend

2005-06-22 Thread Paul Murrell
Hi Uwe Ligges wrote: Thomas Steiner wrote: I color some area grey with polygon() (with a red border) and then I want to have the dashed red border in the legend as well. How do I manage it? And I want to mix (latex) expressions with text in my legend. Both points are not that easy

[R] legend as a subtitle

2005-05-20 Thread Ravi . Vishnu
Very little space is available in one of my plots for the legend. I would like to lift it out of the main plot area and present it in the subtitle area. Would appreciate any help that I can get. Ravi Vishnu This message is meant for the addressee only and may contain confidential and

Re: [R] legend as a subtitle

2005-05-20 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Very little space is available in one of my plots for the legend. I would like to lift it out of the main plot area and present it in the subtitle area. Would appreciate any help that I can get. Look at the following code and read the corresponding help pages:

Re: [R] legend(): how to put variable in subscript?

2005-05-01 Thread Peter Dalgaard
Aleksey Naumov [EMAIL PROTECTED] writes: Dear List, I would like to plot a simple legend with two math expressions, e.g. plot(0) legend(1, 0.5, expression(sigma[i], sigma[j])) The difficulty is that i and j should be variables rather than strings i and j. In other words I'd like to

[R] legend(): how to put variable in subscript?

2005-04-30 Thread Aleksey Naumov
Dear List, I would like to plot a simple legend with two math expressions, e.g. plot(0) legend(1, 0.5, expression(sigma[i], sigma[j])) The difficulty is that i and j should be variables rather than strings i and j. In other words I'd like to do something like: i = A j = B legend(1, 0.5,

[R] Legend in xyplot two columns

2005-04-14 Thread Gesmann, Markus
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 ),

Re: [R] Legend in xyplot two columns

2005-04-14 Thread Deepayan Sarkar
On Thursday 14 April 2005 05:30, Gesmann, Markus wrote: 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(

Re: [R] Legend in xyplot two columns

2005-04-14 Thread Gesmann, Markus
Cc: Gesmann, Markus Subject: Re: [R] Legend in xyplot two columns On Thursday 14 April 2005 05:30, Gesmann, Markus wrote: 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

Re: [R] Legend in xyplot two columns

2005-04-14 Thread Deepayan Sarkar
On Thursday 14 April 2005 10:29, Gesmann, Markus wrote: Thanks Deepayan! Your solution does excatly what I want. Further experiments and thoughts on my side brought me also to a solution. If I use the option rep=FALSE, and plot the bullit with lines and split the lines argument into two

  1   2   >