Displaying 20 results from an estimated 10000 matches similar to: "adjust space between horizontal legend text in a barplot"
1999 Sep 11
1
legend(): adjust space between symbol and tex
Hello,
I'd like to ask, how to adjust the space between symbol/line and text in a
legend. My legend() is build like that
legend(xmax-netzdiff/11, # shouldn't matter here
ifelse(ydiff>=0, #
ymin-6.5*(netzdiff/11), #
ymax-netzdiff/11), #
c("stehender Stamm","Windwurf",
2009 Aug 27
1
Wishlist: specify the border color of boxes in legend() (PR#13913)
I could not find a way to specify the border color of the boxes drawn in
a legend, so that the legend can match exactly the colors of the actual
plot (e.g. in the case of two superimposed histograms which have
different shading and different borders).
Indeed, the legend function seems to hard code the color "black" for the
borders in this call:
rect2(left = xt, top = yt +
2012 Jul 30
2
barplot question
Dear r-help members.
I would like to:
a) control the margin around my legend box. Unfortunately I did not find an appropriate command under "?legend". The margin around the actual legend is way too wide. There is a lot of unnecessary "empty space" on the right side.
b) increase the width of the individual barplots. I saw that this can be obtained with the command
2010 Aug 05
3
Plotting range of values in barplot()
Hello,
I am attempting to create a bar plot that contains a range of possible
response values on the x-axis of 1 to 5 and contains barplots for the number
of responses even in the event that there are 0 responses. For example, I
have a data set that contains values of 2, 3, 4, and 5 but I would also like
my graph to show that there are no 1's.
I have attached the resulting graph. The
2009 Jan 14
4
How to get legend outside of plot?
I am creating a CDF plot function more user-friendly than any default r
function. Depending upon the bimodality of the data (it is often bimodal),
or any other strange data trends, the points can end up gathering in just
about any corner of the plot. So, when I add a legend, whether I choose to
add it in the bottom right, top left, or wherever, it will sometimes end up
putting the legend right
2023 Mar 06
1
legend: interplay between title and y.intersp
Hi,
I think you are right, legend cannot do it. I have now created my own
legend function where I changed only one line and now it works the way I
want it to. But I'm not sure if that might not have other side effects.
I have the impression that the legend and the title start at the same
y-position (try y.intersp=0). Only if y.intersp is big enough, then it
leads to a non-overlap of
2003 Dec 12
1
legend() graphics output bug (PR#5725)
Full_Name: Daniel Gasser
Version: 1.8.1
OS: Win XP
Submission from: (NULL) (130.60.20.92)
The legend()-Function shows a different behaviour than it did in Version 1.6.1.
It plots a black box left of the legend lines on each legend row. In 1.6.1 there
was just the line in appropriate color for each row in the legend (i was using
exactly the same legend statement and same plot function).
My legend
2023 Mar 04
1
legend: interplay between title and y.intersp
Set the legend position explicitly with x and y values and add xpd = TRUE
to the legend call to clip the plot to the figure region and not the plot
region (the default). Something like this (you may have to fool around with
y.intersp, etc. to allow enough space between the legend lines):
plot(c(0,1), c(0,1), type="n")
legend(x = .4, y = 1.25, legend=c("", "",
2012 Sep 06
1
Change margin size of complex barplot
Dear R-help members,
with the help of one of you the following R-Code was developed. No I have the (probably simple) problem that I want to increase font size of "text" and "ylab" names from 1 to 2. Unfortunately I'm not able to adjust the margin so, that the plot is appers complete (all names readable) on a 8:14 Inch scale plot.
Some times I get the error message that
2023 Mar 04
1
legend: interplay between title and y.intersp
Hi,
my MWE is not working as expected:
plot(c(0,1), c(0,1), type="n")
legend("top", legend=c("", "", "a"), col=c("blue", "red", "green"),
title="test", y.intersp=0.2, lwd=1)
The lines are not below the title. I want (nearby) lines as in the plot,
but below the title. Is there a way to achieve this?
2010 Jan 12
1
Multiple symbols per single line in a legend
Hello everybody,
Is it possible to coax legend() into displaying more than one simbol per
line in legend? I have a graph like the one attached to this mail; I would
like to reorganize the legend in such a way that the duplicate text would be
omitted, i.e., the first line would read <square> <triangledown> "increasing
frequency" and the second one would read <circle>
2012 Sep 03
3
Horizontal grid in background of barplot
All,
I have:
x <- matrix(c(22,3,6,69,9,4,7,81,23,4,22,50),nrow=3,byrow=TRUE)
rownames(x) <- c("Cold or flu","Headache","Backache");
colnames(x) <- c("Went to doctor","No response","Did
nothing","Self-medicated")
x <- t(x)
print(x)
barplot(x,beside=TRUE,
ylim=c(0,90),
xlab="Ailment",
2001 Aug 27
1
colorbar legend for image()
Hi,
are there any plans to add a colorbar legend to image()?
Or such a possibility already implemented which I just haven't
discovered yet. Anyway, I will be willing to spent some time on the
implementation if there isn't anyone working on that already.
Thanks
Thomas
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read
2009 Nov 30
1
Continuous legend colors
Dear List,
I am trying to get a basic plot to show a continuous range of fill colors. It is probably easiest to demonstrate. I would like a legend like in the following example:
Satellite.Palette <-colorRampPalette(c("blue3","cyan","aquamarine","yellow","orange","red"))
require(fields)
image.plot(volcano, col = Satellite.Palette
2004 Apr 16
2
barplot() does not draw bars correctly in R 1.9.0 (PR#6776)
Bars are not stacked, but superimposed. This happens even with the first
example of barplot:
tN <- table(Ni <- rpois(100, lambda=5))
r <- barplot(tN, col='gray')
--please do not edit the information below--
Version:
platform = i386-pc-mingw32
arch = i386
os = mingw32
system = i386, mingw32
status =
major = 1
minor = 9.0
year = 2004
month = 04
day = 12
2012 Feb 10
5
how to plot a nice legend?
i'd like to plot a legend in my diagram. The diagram will be included
in a TikZ LaTeX document later.
I tried the legend() function, but
- it can not find a good place it self where the legend fits
and playing around with coordinates and scaling consumes a lot time
- standard settings for the text need adjustment
(linespacing is quite large and so on)
Is there an alternative to
2009 Mar 24
2
Legend containing maths symbol and values of variables
I need to have the maths symbol for >= in the legend, and to
substitute threshold variable with its value. Somehow, various
attempts weren't successful. Please help.
threshold <- 0.5
plot(NA, xlab="", ylab="", main="", axes=F, xlim=c(0,1), ylim=c(0,1),
xaxs="i", yaxs="i")
legend(x=0, y=1, fill=c("orange", "white",
2005 Apr 18
3
Barplot and colors for legend
Hi all!
One quick question: How do I get the standard colors
used by barplot? I have
some stacked bars and would like to add a horizontal
legend via legend() but I
don't know how to find the colors for the fills of the
legend points.
Thanks!
Werner
1998 Dec 15
1
legend
I am trying to put a legend below some plots as follows:
x11()
par(mfcol = c(2, 1), mar = c(5.1, 6.1, 4.1, 2.1))
matplot(matrix(1:30,15,2), type="l", lty=1:2)
par(mfg = c(2, 1, 2, 1))
legend((par()$usr)[1:2], (par()$usr)[3:4], c("a","b"), lty = 1:2, col=1:2, bty
= "y")
The letters "a" and "b" print but not the lines. If I omit
2003 Oct 30
1
legend over-prints barplot bar
When I create a bar plot, the legend is obscuring the rightmost bar.
I haven't found a setting that appears to affect the positioning of the legend - any tips re moving the legend would be most appreciated.
paul sorenson