Displaying 20 results from an estimated 10000 matches similar to: "Placing legends"
2010 Mar 10
2
Placing the legend 'dynamically'
Hello,
does anybody know which command to consider when I'm trying to plot a
stacked barplot with a legend at the most empty portion of the graphic?
I've searched for it, and somebody stated to use the labcurve-command,
but I don't know how to produce stacked barplots with it.
Is there any possibility to plot a legend box "dynamically" (= in an
empty region) with the
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
2003 Oct 01
1
Text cutoff in legends
Dear r-help
If I display plots on the X11 device, the legends looks fine. But if
make an EPS, the longer entry in the legend is cutoff (and also in the
.pdf I do from the .eps)
Can you give me a hint and tell me what I do wrong, please ?
postscript("plot.eps",paper="special",horizontal=F,onefile=F,width=8.0,height=7.0)
dev.set (2)
dev.copy (which=3)
dev.off (3)
R Version
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
2006 Nov 04
2
Placing of legends
Hello,
placings of legends is sometimes tricky.
For placing outside the plot region I found locator to be useful.
Unfortunately, the click defines the upper left corner.
Is there a way to change this corner (say lower right corner)?
Thanks,
Christian
2009 Oct 12
1
Position of legend box
Good morning to you. I have about 4 different lines in one plot. I have used
legend to indicate the colour of each plot. But the box contain the legend
covers part of the lines thereby blurring the legend. There are some spaces
in the plot that are empty and large enough to accommodate the legend box.
If there a command I could use to set the position of the legend myself.
I added the legend
2009 Apr 30
1
Legend best position
Hi all,
I'm doing a lot of plots and all of them should have a legend. The
problem is that this legend not always have to be in the same place,
because some plots can override the legend box. I'm wondering if there
exist a command that "optimally" allocate the legend position, I'm
refer to a MATLAB's command'slegend and it's option "Best". Exist?
What
2002 Sep 17
2
legend in image()
System info:
Linux slackware
R Version 1.5.1 (2002-06-17)
ESS 5.1.21
Emacs 21.2.1
-------------------
Colleagues
Is there a way to add a legend to an image plot? I don't see any
reference to legends in the documentation (so I suppose the answer is
no?). Although the documentation says image takes plot() parameters, it
isn't clear to me how the usual use of legend in a plot command
2004 Aug 13
1
cell counting in R
I have a bunch of jpg files that I need to count cells on. Some cells are green and some cells are red. Is there a function like locator that I could use to manually count the cells? I would like to be able to click on a cell, have it marked so I don't count it again and have a counter keep track. Locator comes close but I would only be able to count one colour at a time. Is there a way I
2013 Jan 26
2
different legends in lattice panels
Hi listers,
I want to make lattice plots xyplots with the indication of legends
inside each panel with only the points and the lines actually ploted
inside each given panel according to the group(ing) factor.
The code below shows what I have achieved so far and I hope will make
clear what I want to have.
It seems to me that my solution is a very "dirty hack" and there
certainly is
2005 Jul 04
1
Rotate legends or other approaches to nice legend placement?
I'm sure this general sort of question has been asked many times before
- I would _like_ automatic and sensible legend placement in barplots so
data is not overwritten... but since there doesn't seem to be one, one
of the following would be useful:
One approach for this would be to place the legend to the right of the
graph, and rotate it by 90 degrees.
Is there a sensible way to do
2008 Sep 30
1
Adding legends to a plot
Hello,
I have a time series plot drawn using 3 different colored lines, each line
corresponds to different category group. I'd like to put legends on the
plot. I am using "legend" to do this, however, I can either specify lty or
col in legend. Will I be able to do the following in the legend box: a solid
black line then g1, a solid red line then g2, a solid blue line then g3?
2004 Aug 20
3
legends on the outside of the "box"
Hi R People:
Here is a simple set of commands:
>x1 <- 1:10
>x2 <- sqrt(x1)
>plot(x1)
>points(x2,col="red",pch=3)
>legend(2,8,legend=c("First","Second"),col=c("black","red"),pch=c(1,3))
>
Fine.
Now, I would like to put the legend box on the outside of the plot itself,
perhaps in the lower
left hand corner.
I've been
2006 Sep 22
1
legends in a plot
Hi there,
I have the following plot. The circles and the line do not cross in
the main plot. But in the legend, the circle and the line cross. I am
wondering if there is a way to make the legend look like the plot
without crossing. I looked around but did not find a way to do that.
Is it doable?
plot(x,x^1.5, pch=1, lty=1, type='b')
legend(1,25, legend="hello",pch=1,
2001 Nov 29
1
legends in barplots of factors
How can I suppress a legend in a barplot when I'm plotting factors?
Here's what I'm doing, x and y are both factors:
plot(x,y)
This gives me a barplot with a legend where I don't want it.
My best solution so far is plot(x,y,legend=F) which just gives me an
error message and doesn't finish the plot, but at least it doesn't put
the legend on. Then I can go back and add
2002 Nov 12
4
trouble positioning legends on barplot written to a file
I'm trying to generate some plots for print publication and I'm having trouble
getting them the way I want. I get a plot with a legend that overlaps the bars
and looks bad. Also, I'm saving this as PDF file (whatever happened to the
"png" function to save as PNG format, in r 1.4.1?)
I've tried a number of things, which produce a number of questions.
1) it seems that the
2003 Jul 28
1
Plotting (mixed) line types and legends
Hi all
I have a question about plotting line types and
legends. Here's a short piece of code to
demonstrate:
x <- y <- seq(1,10)
plot(x,y, type ="l", lty="33")
lines(x,y+1, lty=1)
legend( 8,2,legend=c("lty=1","lty=\"33\""), lty=c(1,"33") )
On my system (see below), the line types in the legend
are not the same as in the
2000 Oct 24
1
is there a way to create legends automatically?
Hi all,
when plotting mutiple data series, i need to specify how one data series
should be plotted. that s fine, but can i let the program automatically
create legends afterwards? thanks very much.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or
2009 Feb 26
1
bottom legends in ggplot2 ?
Has anyone had success with producing legends to a qplot graph such that the legend is placed on the bottom, under the abcissa rather than to the right hand side ?
The following doesn't move the legend:
library(ggplot2)
qplot(mpg, wt, data=mtcars, colour=cyl, gpar(legend.position="bottom") )
I am using ggplot2_0.8.2.
Thanks in advance,
Avram
2000 Dec 21
2
Legends on plots
I'm trying to develop a systematic way of placing legends on (among other
things) scatterplots of grouped data. The journals in my field can be very
fussy about the placement of figure legends. Typically they want them to
be in either of two places - the upper left corner of the plotting area,
not obscuring any data points, or outside the plotting area in the lower
right hand corner of