search for: xchar

Displaying 17 results from an estimated 17 matches for "xchar".

Did you mean: char
1997 May 11
2
R-alpha: Logarithmic scales
...ck", lty, pch, bty = "o", bg = par("bg"), xjust = 0, yjust = 1, ...) { xlog <- par("xlog") ylog <- par("ylog") if (xlog) x <- log10(x) if (ylog) y <- log10(y) xchar <- xinch(par("cin")[1]) ychar <- yinch(par("cin")[2]) * 1.2 xbox <- xinch(par("cin")[2] * 0.8) ybox <- yinch(par("cin")[2] * 0.8) yline <- 2 * xchar w <- 2 * xchar + max(strwidth(legend)) h &lt...
1997 Jun 23
0
R-alpha: various graphics Q.
...without having to have a symbol or a line for every item in the legend, and to be able to put symbols and lines in the same column (option "merge"). The spacing's not quite perfect, though. 3c3 < xjust=0, yjust=1, merge=FALSE, ...) --- > xjust=0, yjust=1, ...) 5,8c5,8 < xchar <- xinch(par("cin")[1])*par("cex") < ychar <- yinch(par("cin")[2])*1.2*par("cex") < xbox <- xinch(par("cin")[2]*0.8)*par("cex") < ybox <- yinch(par("cin")[2]*0.8)*par("cex") --- > xchar <-...
2000 Oct 19
0
legend -- one more try
.../base/R/legend.R Wed Sep 6 04:11:16 2000 *************** *** 141,171 **** } if(has.pch || do.lines) col <- rep(col,length.out=n.leg) - - if (do.lines) { #- draw lines --------------------- - seg.len <- 2 # length of drawn segment, in xchar units - ok.l <- if(missing(lty)) { lty <- 1; TRUE } else lty > 0 - if(missing(lwd)) lwd <- par("lwd") - lty <- rep(lty, length.out = n.leg) - lwd <- rep(lwd, length.out = n.leg) - if(trace) - catn(" segments2(",xt[ok.l] + x.off*xchar ,",",...
2001 Jan 15
0
legend() patch never seems to have made it in
...brary/base/R/legend.R Wed Sep 6 04:11:16 2000 *************** *** 141,171 **** } if(has.pch || do.lines) col <- rep(col,length.out=n.leg) - - if (do.lines) { #- draw lines --------------------- - seg.len <- 2 # length of drawn segment, in xchar units - ok.l <- if(missing(lty)) { lty <- 1; TRUE } else lty > 0 - if(missing(lwd)) lwd <- par("lwd") - lty <- rep(lty, length.out = n.leg) - lwd <- rep(lwd, length.out = n.leg) - if(trace) - catn(" segments2(",xt[ok.l] + x.off*xchar ,",",...
2003 Aug 27
4
read.spss (package foreign) and character columns
...re is one thing I noticed with "read.spss", and I'd like to ask if this is considered to be a feature, or possibly a bug: When reading character columns, character strings seem to get filled with blanks at the end. Simple example: In SPSS, create a file with one variable called "xchar" of type "A5" (character of length 5), and 3 values ("a", "ab", "abcde"), save it as "test.sav". In R: > library(foreign) > test <- read.spss("test.sav", to.data.frame=T) > test XCHAR 1 a 2 ab 3 abcde > level...
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
2003 Feb 24
2
"trace" argument in legend() (PR#2578)
...rom: (NULL) (142.103.173.179) Should be an easy fix... Consider the examble below: plot(0,0) legend(0,0,c("Hello!","Hi!"),pch=1:2,lty=1:2,trace=T) It gives the following trace: > plot(0,0) > legend(0,0,c("Hello!","Hi!"),pch=1:2,lty=1:2,trace=T) xchar= 0.05178 ; (yextra,ychar)= 0 0.07941 rect2(0,0, w=0.3474, h=0.2382...) segments2(0.015540.01554,-0.07941-0.1588, dx=0.1036, dy=0, ...) points2( 0.06732 0.06732 , -0.07941 -0.1588 , pch= 1 2 ...) On the line starting by "segment2", the coordinates are not separated by a space like o...
2000 May 31
1
legend with multiple columns
...&& nchar(pch[1]) > 1) { if(length(pch) > 1) *************** *** 98,108 **** } else {## nx == 1 ## -- (w,h) := (width,height) of the box to draw -- computed in steps ! h <- n.leg * ychar + yc ! w <- text.width + (1.5 + x.intersp) * xchar ! if(!missing(fill)) w <- w + dx.fill ! if(has.pch && !merge) w <- w + dx.pch ! if(do.lines) w <- w + (2+x.off) * xchar ##-- (w,h) are now the final box width/height. left <- x - xjust * w top <- y + (1 - yj...
2011 Jul 18
2
line jump in plot legend title
Hello, In order to reduce the width of my legend in a plot I introduced line jumps in the title. Here's the problem; the legend box hasn't adapted accordingly and part of the title is printed out of the frame. See the example below: plot(1:10) legend("bottomright", bg="white", fill=c(7,8,12,13,19),
1998 Mar 26
0
S programming style & "missing(.)" [was "regarding bugs in barplot" on R-core]
...39;m probably also among the culprits..). Since it's mentioned here, following is the patch against 0.61.2: --- R-0.61.2/src/library/base/R/legend Wed Nov 12 04:53:32 1997 +++ R-devel/src/library/base/R/legend.R Thu Mar 26 06:02:23 1998 @@ -60,13 +60,17 @@ if(!merge) w <- w + x.intersp * xchar if(merge) w <- w + x.intersp * xchar ## (w,h) are now the final box width/height. --> Adjust (x,y) : - x <- x - xjust * w - y <- y + (1 - yjust) * h + left <- x - xjust * w + top <- y + (1 - yjust) * h + right <- left+w + bottom <- top-h + if (xlog) { left <- 10^left;...
2000 Jun 09
2
w0 in legend
In Version 1.1.0 Under development (unstable) (June 8, 2000) there seems to be a problem with an internal variable w0 in legend that generates the following new error: Error in legend((par()$usr)[1:2], (par()$usr)[3:4], Legend, lty = lty, : Object "w0" not found > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read
2008 Nov 27
1
A small bug in R code of the legend function of the Graphics pacakge (PR#13340)
...out = n.leg) pt.bg <- rep(pt.bg, length.out = n.leg) pt.cex <- rep(pt.cex, length.out = n.leg) pt.lwd <- rep(pt.lwd, length.out = n.leg) ok <- !is.na(pch) & (is.character(pch) | pch >= 0) x1 <- (if (merge) xt - (seg.len/2) * xchar so if do.lines isn't specified, but has.pch and merge are specified an error is produced. Guess that seg.len should be initialized before the condition "if (do.lines)" Thanks in advance.
2010 Jul 22
5
legend in R plot
Hi all, I am have some difficulty with the legend function. I need to add a legend to describe the different line types in a plot. The legend box is small. It did not include sufficient length of each line type to help distinguish the differnt line types. Is there a way to fix this. Thank you Hannah [[alternative HTML version deleted]]
2007 Jul 03
1
Please help with legend command
Hi R-ers: I'm drawing a plot and have used different line types (lty) for different race/ethnicity groups. I want a legend that explains what line types correspond to the different race/ethnicity groups. I used the following code: legend( 1992 , 42 , c("Hispanic" , "non-Hispanic white (NHW)" , "non-Hispanic black" , "AI/AN" , "Asian" ) ,
2009 Apr 29
0
XML Builder - problems with serialized ruby
...contains serialized ruby. Builder''s to_xs method seems to mangle serialized ruby though. I can get around this by encoding/decoding with base 64, but that doesn''t seem like a good path to follow. Builder is using this code for escaping: http://intertwingly.net/stories/2005/09/28/xchar.rb Any ideas on how to modify that, so serialized ruby will be escaped properly? Thanks, Matt
2008 Dec 22
0
Align legend title
...riz = FALSE, title = NULL, - inset = 0, xpd, title.col = text.col) + inset = 0, xpd, title.col = text.col, title.adj = 0.5) { ## the 2nd arg may really be `legend' if(missing(legend) && !missing(y) && @@ -259,11 +259,11 @@ xt <- xt + x.intersp * xchar if(plot) { - if (!is.null(title)) - text2(left + w/2, top - ymax, labels = title, - adj = c(0.5, 0), cex = cex, col = title.col) + if(!is.null(title)) + text2(left + w/2 + ((w - tw) * (title.adj - 0.5)), top - ymax, + labels...
2006 May 10
2
Legend titles in log plots broken? (ver. 2.2.1)
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 = 'topright', inset = 0.04, legend = '1/x', lty = 1,