Displaying 20 results from an estimated 30000 matches similar to: "text colour in legend"
2005 Jun 23
3
grep negation
hi,
using the example in the grep help:
txt <- c("arm","foot","lefroo", "bafoobar")
i <- grep("foo",txt); i
[1] 2 4
but how can i get the negation (1,3) when looking for 'foo'?
thanks,
m.
2002 Jun 05
6
mixing different modes of lty line type specification in legend() ?
Hi List,
is sth. like the following possible:
legend(x,y,c("A","B","C"), lty=list(1,"42","11")) ?
Or: is there a possibility to define a solid line using the "string" mode for lty?
Thanks
Marcus
--
+-------- ><> -------------------------------------------
| E-Mail: eger.m at gmx.de (NEW)
| marcus.eger at
2010 Apr 26
5
How to make legend with line+ character
Dear all,
I have a multiline plot with each line labeled with a different letter.
But I'm not able to make the legend display the same kind of pattern
'-a-', instead the letter is overwritten by the line. A simpler legend
with only the letter is not very visible and the pt.bg does nothing with
letters. Any idea?
plot(1:10,10:1,lty=1,type='b', lwd=2,pch='a')
2010 Sep 10
3
ggplot bar geom: control the filling in the colour legend
Hi all,
Is it possible to change the filling of the squares used to represent
the colour legend in a bar plot with ggplot?
in this example, fillings are raven black, I'd like them white.
ggplot(diamonds, aes(clarity, colour = cut)) + geom_bar()
Regards
--
-------------
Benoit Boulinguiez
Ph.D student
Ecole de Chimie de Rennes (ENSCR) Bureau 1.20
Equipe CIP UMR CNRS 6226 "Sciences
2013 Sep 26
1
Less than equal to symbol in ggplot2 legend text
Hello,
I am trying to add a less than equal to symbol in a ggplot2 legend text.
See sample code below. I have tried using the expression function and
\u2264. I also tried adding labels to legend.text under theme.
Neither of these 3 options work.
Please help,
Mahesh
++++++++++++++
Extra.column=ifelse(data[,covariate]>cutpoint,1,0)
Grp1 <- "\u2264 1.5"
Grp2 <-
2008 Jul 22
1
tklistbox and extracting selection to R
Dear experts,
I am trying to understand why is it that when I paste (into the R console) the following code to select an option from a list:
require(tcltk)
tt<-tktoplevel()
tl<-tklistbox(tt,height=ntx,selectmode="single",background="white")
tkgrid(tklabel(tt,text="Select the legend of" ))
tkgrid(tl)
treatments<<-levels.tx
for(i in
2013 Mar 08
2
Zoo Data
Hi Jakob,
dat1<-read.table(text="
TIME, Value1, Value2
01.08.2011 02:30:00, 4.4, 4.7
01.09.2011 03:00:00, 4.2, 4.3
01.11.2011 01:00:00, 3.5, 4.3
01.12.2011 01:40:00, 3.4, 4.5
01.01.2012 02:00:00, 4.8, 5.3
01.02.2012 02:30:00, 4.9, 5.2
01.08.2012 02:30:00, 4.1, 4.7
01.12.2012 03:00:00, 4.7, 4.3
01.01.2013 01:00:00, 3, 4.3
01.01.2013 01:30:00, 3.8, 4.1
01.01.2013 02:00:00, 3.8,
2010 Feb 08
1
R ggplot2 legend text left justify
In ggplot2 how do you justify the legend text ?
In the example below the opts(legend.text = theme_text(size =
9,hjust=0)) changes the size of the text OK but it remains right
justified.
> mydata=data.frame(RowID=c("A","B","C"),Name=c("long long long long
long name","short name ","medium medium name"),Speed=c(100,140,120))
>
2013 May 12
1
How to center a horizontal legend with specified 'text.width'
Hello dear list,
I just cannot figure out how to do this and didn't find a solution for my specific problem.
I want to place a centered horizontal legend between 4 plots. That's no problem.
The problem is: As soon as I specify the "text.width" parameter to separate the two legend entries, the legend is not centered anymore. I thought the 'xjust' parameter would do what
2010 Jul 11
1
difficulty with R expressions in text/legend
hi, i'm trying to prepend some plain (i.e. unevalutated) text to a
typographically evaluated R expression in a legend(...) call.
here's a working legend(...) call that is close to what i'd like
(where x and y are returned from an lm(...) call):
legend("topleft", legend = c(bquote(R^2 == .(summary(x)$r.squared)),
bquote(R^2 == .(summary(y)$r.squared))), fill =
2011 Aug 21
2
Increase the size of the boxes but not the text in a legend
HI there,
I want to add a legend to a plot using the density and angle argument,
so patterns with lines in different angles are used in the plot and
should be referred to.
When I use default settings, the filled boxes are too small.
With the cex argument I can enlarge the whole legend, but then the text
gets too big.
How could I just increase the size of the single boxes and not the text.
I
2010 Feb 16
1
Legend Text Font Size
Hi.
I have a plot containing a large number of lines. I have placed a
legend in the plot, but with so many lines, the legend takes up a lot
of space. I have tried to reduce the spacing between the lines using
the legend parameter x.intersp=0.7, but this does not compress the
legend enough. Is there some way to make the text font size smaller
in "legend"?
Thanks,
RH.
2011 Apr 29
3
Change the text size of the title in a legend of a R plot.
Hello,
Is it possible to change the text size of the title in a legend of a R plot?
I tried to directly change the title.cex argument but it seems not to work.
Trying :
Horizo <- c(1,2,6,10,20)
legtext <- paste(Horizo,sep="")
legend("topleft", legend=legtext,col=col,text.col=col,lwd=lwd,
lty=lty,cex=1.1,ncol=3,title = "Horizons",title.col
2009 Dec 11
1
Array of legend text with math symbols from predefined variables
Hello,
I am trying to include legend text with math symbols from a predefined
character variable that is read in from a file.
?
If there is only one line of text in the legend, the following, although
cumbersome, works for me:
? > LegendText = " 'U' [infinity], '=10 m/s' "?? # (read in from a file)
??> LegendName = paste("bquote(paste(",LegendText,
2012 Jun 13
2
adjust space between horizontal legend text in a barplot
Hi All,
I produced a barplot and made a horizontal legend below the graph.
Because the results are from a survey, there are three levels, namely
strongly disagree/disagree, neutral and strongly agree/agree.
> rownames(survey)[1] "Strongly disagree/disagree" "Neutral" "Strongly agree/agree"
As in the output above, there is a large space
2005 Sep 07
1
Text Size in Legend
Hello,
I need to reduce the size of the text in a legend since the legend is
overlapping with the curves in my plot. I've not been able to identify any
way to achieve this in the documentation. Anyone have any suggestions on how
to scale down the text or the overall legend?
Thanks in advance for your help!
Chris Diehl
[[alternative HTML version deleted]]
2008 Mar 19
4
plot with diffrent colour and plotting symbols
Dear mailing list members,
I am a new R user, I would like to plot the follewing data
var1 <- c(1,2,1,1,2,1,2,1,2,2)
var2 <- round(rgamma(10,2,1)/0.1)*0.1
var3 <- c(0,1,0,1,0,0,0,0,1,0)
var4 <- c(1,2,2,2,1,1,1,1,1,1)
Var <- data.frame(var1,var2,var3,var4)
Var <- Var[sort(Var$var1),]
tt <- Var$var1+((runif(length(Var$var1))/6)-(0.5/6))
labelname <- c("time 1",
2013 Jan 23
1
italic font for legend text when using expression function for symbols
Hello,
I'm trying to add a symbol (Delta) to plot legend with text using
"expression(paste())" but this disables the text.font that allows to use
bold or italic text.
as follows:
x=c(1:10)
y=c(1:10)
plot(x,y)
legend(1,10,legend=c("A","B","C",expression(paste(Delta, D))),
pch=c(24,18,17,16),cex=2,text.font=3,bty="n")
Any suggestion to
2004 Jan 15
2
Legend text -- discrepancy between X11 and postscript
Hi,
When I place a legend on a plot it looks exactly as I intended
on the screen. However, almost always, when I export this to
postscript file, the legend's text protrudes through the legend's
frame (the latter being placed correctly).
See the appended example code. I can send the EPS file as well
for those that are interested (<4 kb; <200 lines).
I found nothing in the FAQS,
2010 Dec 17
1
ggplot missing fill colours in boxplot legend
Hello,
I am trying to create a series of boxplots with the following data, three
columns, "Day" (1 or 2), "Site" (1-4), and "VO2" (some values missing for
some Sites or Days)
> CorbulaMR3
Day Site VO2
1 1 1 88.92223
2 1 1 86.17873
3 1 1 61.08950
4 1 1 190.47922
5 1 1 98.65930
6 1 1 121.03549
7 1 1 67.88404
8