similar to: R-alpha: various graphics Q.

Displaying 20 results from an estimated 600 matches similar to: "R-alpha: various graphics Q."

1997 May 11
2
R-alpha: Logarithmic scales
Here are another three problems with logarithmic scales: 1) segments() does not work with logarithmic scales. I suggest to change lines 962-973 in "plot.c": for (i = 0; i < n; i++) { if (FINITE(xt(x0[i%nx0])) && FINITE(yt(y0[i%ny0])) && FINITE(xt(x1[i%nx1])) && FINITE(yt(y1[i%ny1]))) { GP->col = INTEGER(col)[i % ncol];
2000 May 31
1
legend with multiple columns
I have made a minor hack to "legend" (in R 1.0.0, but I didn't notice any changes to legend in the 1.0.1 NEWS) to allow the legend to be formatted in multiple columns, or horizontally (number of columns <- number of legend items). (I find this helpful when I have lots of legend items and not a lot of vertical space to squeeze the legend into.) (Another hack I've considered
1998 Mar 26
0
S programming style & "missing(.)" [was "regarding bugs in barplot" on R-core]
[The part about S (S-plus and R being dialects of S) programming (at the end) makes me cc'ing this to R-devel. MM] On R-core, >>>>> "Paul" == Paul Murrell <paul@stat.auckland.ac.nz> writes: Paul> hi (i) the problem with the positioning of the legend in your Paul> barplot example: Paul>
2003 Feb 24
2
"trace" argument in legend() (PR#2578)
Full_Name: Jerome Asselin Version: 1.6.2 OS: RedHat Linux 7.2 Submission from: (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 ;
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
2008 Nov 07
0
barplot can put legend in wrong place, request option to override that (PR#13265)
This in an enhancement requestion, to add the capability to pass arguments through barplot() to legend(). I've created a version that does this. # Run this code; notice that the legend # is superposed over one bar: barplot(height = cbind(x = c(465,91) / 465 * 100, y = c(840,200) / 840 * 100, z = c(37,17) / 37 * 100), beside = FALSE, width =
2000 Oct 19
0
legend -- one more try
Dermot MacSweeney pointed out to me that after my "fix" of legend(), points were no longer coming out placed in the middle of the lines, but at the right-hand edge. It turns out that naively swapping the order of point-drawing and line-drawing also messes up the bookkeeping that legend() does on the current x-location. Here's my patch, which fixes that bookkeeping (and incidentally
2001 Jan 15
0
legend() patch never seems to have made it in
Perhaps I should have submitted this as a bug so that it would be officially tracked. It's not a big deal, but here it is again (I can't remember which version this patch is against, but I don't think legend() has changed since then ...) Basically, the problem is that if you want to have "opaque" points that overlay lines (rather than using type="b" and having
2002 Mar 21
1
legend - bug with argument angle (PR#1404)
When legend() is used with the angle argument as follows, not only the boxes beside the legend text, but also the whole legend box is filled with shading lines. I think this is not intended: plot(1:10) legend(8, 4, c("A", "B"), angle=c(10, 80), fill=NULL, density=20) I'd suggest as a fix (legend.R of R-1.5.0): 25c25 < rect2 <- function(left, top, dx, dy,
1997 Aug 25
0
R-alpha: barplot()
I've created a hacked version of barplot() which is more compatible with the S version, but currently ONLY FOR VECTORS. Differences && new features: * The `space' argument is interpreted as the fraction of the average bar width. (The current version has the width of the bar plus the space in between constrained to sum to 1.) * There is a new argument `width'. * There is a
2008 Jul 27
1
Color of box frame in Legend (Was: Matrix barplot)
On Sun, 27 Jul 2008, S Ellison wrote: > Looking at the legend() source the filled box line colour is hardcoded : > if (mfill) { > if (plot) { > fill <- rep(fill, length.out = n.leg) > rect2(left = xt, top = yt + ybox/2, dx = xbox, dy = ybox, > col = fill, density = density, angle = angle, > border =
2004 Nov 08
1
whishlist: legend - changing color of the boxes-border
Hi, Drawing a legend I would like to be able to specify the color of boxes which are drawn if fill or density is specified. eg. legend(0,40000,c("raw","LR/PR-TPS"),fill=c(1,2),col=c(1,2),density=c(20,20),angle=c(-20,45),bty="n") Currently the color of the boxes -- border is always black and can *not* be changed. To get this option only a *minimal* change is
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 +
2008 Jun 05
0
bug in barplot.default (graphics) (PR#11585)
There seems to be a minor bug in barplot.default when used with log scale w= here one or more values is NA: dat <- matrix(1:25, 5) dat[2,3] <- NA barplot(dat, beside =3D T) #Plots and appropriate barplot with gaps for m= issing data barplot(dat, beside =3D T, log =3D "y") #Error in if (min(height + offset) <=3D 0) stop("log scale error: at least = one 'height +
2008 Dec 22
0
Align legend title
Dear R developers, I needed to align the title of legend for some of my plots. If there is interest to include this into base R, bellow are the examples and the relevent diffs. Regards, Gregor x <- 1:10 y1 <- 1.5 * x y2 <- 2.0 * x y <- cbind(y1, y2) source(file=url("http://gregor.gorjanc.googlepages.com/legend.R")) matplot(x, y, type="l", lty=c(1, 2)) ##
2003 Aug 27
4
read.spss (package foreign) and character columns
Dear R users! I am using R Version 1.7.1, Windows XP, package "foreign" (Version: 0.6-1), SPSS 11.5.1. There 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
2013 Jul 16
1
Masking oceans using polypath
Hi R-help I am trying to mask the ocean from an image plot I have made. Here is some example code: library(mapdata) image(x=110:155, y =-40:-10, z = outer(1:45, 1:30, "+"), xlab = "lon", ylab = "lat") outline <- map("worldHires", plot=FALSE) # returns a list of x/y coords xrange <- range(outline$x, na.rm=TRUE) # get bounding box yrange
2003 Aug 20
0
SJava in R
Hi, Did anyone sucessfully install SJava package to R and was able to call R function from java in redhat linux8.0? I tried several days it still give me error either in libR.so or libjvm.so. for example, I can compile JavaRCall.java(a example with the SJava package) without problem. When I run it, it can connect to R and accomplish part of results, but fail for other calls. The outputs are:
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),
2010 Nov 17
1
rasterImage and coordinate conversion
Hi, I have a plot and I would like to overlay a PNG image over it. I'm using the rasterImage function to do this, but the problem I'm facing is working out the coordinates of the upper right corner of the final image in user coordinates. That is I can place the image so the lower left is located at the bottom of the y-axis and the left end of the x-axis. Since my image is say 100px x