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 *
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))
]
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
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
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
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
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
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,
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
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
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
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
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,
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 #
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
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
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
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
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
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
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,
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)
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)
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,
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)
? 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
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 -
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
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
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
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),
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
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
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
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
, 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
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
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),
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
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'),
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)
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
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
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
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
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
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 -
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))
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
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
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
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
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
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
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 -
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
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
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
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]]
__
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!
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
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
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
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!
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
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
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
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
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
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 =
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),
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:
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
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
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
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
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
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
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.
: 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
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
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
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.
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
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,
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
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,
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
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
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
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
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
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
[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:
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
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,
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 ),
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(
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
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 - 100 of 146 matches
Mail list logo