Displaying 20 results from an estimated 300 matches similar to: "possible bug: graphics::image seems to ignore getOption("preferRaster")"
2020 Oct 02
1
What is the threshold for `useRaster` of graphics::image()?
Hi R-help list
What is the threshold for the `useRaster` argument of graphics::image()
to decide whether a grid is "regular" or not (i.e. the usage of
useRaster=T is allowed or not). My
`dev.capabilities("rasterImage")$rasterImage` is "yes".
I could not find this information in the internet. I also could not find
the source code of the graphics::image() function (I
2011 Feb 09
2
using rasterImage within image
Has anyone yet tried incorporating rasterImage into the base image()
function? It seems to make a *huge* difference, with
a very small number of added/changed lines of code. (Of course I have
barely tested it at all.)
Is there any reason this *shouldn't* go into the next release?
> source("image.R")
> z <- matrix(runif(1e6),nrow=1000)
> image(z)
>
2012 Jan 11
1
Inconsistencies in device_Raster when axes are reflected
I noticed some undocumented and inconsistent behavior in device_Raster when a
plot is produced with reflected axes such as:
image(volcano, xlim = c(1,0), useRaster = TRUE)
image(volcano, ylim = c(1,0), useRaster = TRUE)
The `pdf` device will perform horizontal and vertical reflections, while
`quartz` will ignore the transformations when plotting to the screen, but
when plotting to a
2012 May 07
1
Plotting a raster image
Hello,
I have a data frame which looks like
> head(d)
a1 a2 n j col
1 1 1 88341002 11 #E7E7E7
2 1 2 25094882 11 #E7E7E7
3 1 3 16916246 11 #E7E7E7
4 1 4 14289229 11 #E7E7E7
5 1 5 11945929 11 #E7E7E7
6 1 6 8401235 11 #E7E7E7
The values in 'j' run from 1 to 11. I would like to plot the point (a1,a2)
with color given by j
I tried
mi <-
2010 Oct 01
1
colored rasterImage()
Hello,
I have been exploring the possibility to transition some code that
currently uses image() to use the new rasterImage(). To date, I
haven't been able to specify a color look-up strategy that works. For
example...
nx <- 100
ny <- 100
m <- matrix(data = rep(seq(0,1, length = nx), ny), ncol = nx, nrow =
ny, byrow = TRUE)
plot(1:nx, 1:ny, type = "n")
my.color
2010 Oct 01
2
strange interaction between rasterImage and Grid graphics
Dear all,
This may be specific to Mac, I haven't had a chance to test another
platform. Consider this,
plot(1,1,t="n")
rasterImage(matrix(1),1,1,1,1)
library(grid)
grid.rect(gp=gpar(fill="grey"))
The grid.rect covers the full device window as expected. However, when
I resize the window ever so slightly (interactive device) the rectGrob
is suddenly clipped to the previous
2010 Oct 18
1
Incorrect positioning of raster images on Windows
I am working on dumping raster data from R into PNG files using
rasterImage(). I am working with a test matrix from the rasterImage()
example and using it to produce a PNG image with the following code:
# From the example for rasterImage(). A 3 pixel by 5 pixel b/w checkerboard.
testImage <- as.raster(0:1, nrow=3, ncol=5)
testImage
[,1] [,2] [,3] [,4] [,5]
[1,]
2010 Oct 18
1
Incorrect positioning of raster images on Windows
I am working on dumping raster data from R into PNG files using
rasterImage(). I am working with a test matrix from the rasterImage()
example and using it to produce a PNG image with the following code:
# From the example for rasterImage(). A 3 pixel by 5 pixel b/w checkerboard.
testImage <- as.raster(0:1, nrow=3, ncol=5)
testImage
[,1] [,2] [,3] [,4] [,5]
[1,]
2012 May 15
0
Problem with legend and RasterLayer
Dear,
I can't plot legend over a Rasterlayer.
My system is MAC OS Lion.
See my problem:
####### Data
> img
class : RasterLayer
dimensions : 5, 5, 25 (nrow, ncol, ncell)
resolution : 0.002245, 0.002245 (x, y)
extent : -48.33875, -48.32753, -20.35756, -20.34634 (xmin, xmax,
ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84
+towgs84=0,0,0
2011 Aug 03
1
one way to solve bad looking density plots in postscript
Hi,
When R generates density plots and these are exported to postscript(
a=matrix(1:100,10,10);image(a,col=rainbow(100);dev.copy2eps(file="image.eps")
)
The result often looks bad when rendered on screen. The help page states that this is because programs use anti-aliasing. That seems to be true - turning off anti-aliasing for gs (-dGraphicsAlphaBits=1) of in OSX's preview makes
2011 Feb 15
1
Using rasterImage on a CairoWin device prevents adding further elements to device?
I was pointed to the Cairo package for plotting PNG images on a
device. I've been playing around with it, but found that after I use
the rasterImage function, I can't add anything any more to the device,
eg :
img <- readPNG(system.file("img", "Rlogo.png", package="png"))
r = as.raster(img[,,1:3])
r[img[,,4] == 0] = "white"
CairoWin()
2012 Jul 27
1
overlaying a set of 'grouping' lines on a plot from image()
Hi, I have a matrix that I am displaying via image. I would like to
obtain an image where the columns are 'grouped' (I have a grouping
variable). But I am not sure how how I can draw the lines to indicate
the grouping in the margin. I realize this is essentially waht heatmap
does but as I have a set of custom breaks and colors I wanted to
generate this via image. I can see that it is a
2013 Mar 02
1
Raster images and saving with original pixel dimensions in tiff, jpeg, or png perferablly.
Hello R-Help,
I want to be able to read in a raster image, plot it with grid.raster
or rasterImage and save the image with one pixel per a pixel element
from my array. Saved preferably in a common image format.
The real goal of my question is to eventually read in images with text
on them, manipulate them with my controlled functions, save them
without changing the image dimensions, and perform
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
2007 May 02
1
missing values
hello,
I need your help for this example
> for(k in LR) {
+ donGeno[[k]] <- as.numeric(levels(factor(subset(don2, Id_Essai == 1006961 & Id_Cara == LC[1] & Id_Rep == k, select = Id_Geno)[,1])))
+ print(donGeno[[k]])}
[1] 65125 65126 65127 65128 65129 65130 65131 65132 65133 65134 65135 65136 65137 65138 65139 65140 65141 65142 65143 65144 65171
[1] 65126 65127 65128 65129 65130
2012 Feb 29
0
R 2.14.2 is released + R anniversary
The build system rolled up R-2.14.2.tar.gz (codename "Gift-Getting Season") at 9:00 this morning. This is intended to be the final round-up release of the 2.14 series; see the list below for details.
(The codename is still not part of the actual sources. That feature will have to wait for 2.15.0, "Easter Beagle").
This release also marks the 3rd anniversary of R-1.0.0.
You
2012 Feb 29
0
R 2.14.2 is released + R anniversary
The build system rolled up R-2.14.2.tar.gz (codename "Gift-Getting Season") at 9:00 this morning. This is intended to be the final round-up release of the 2.14 series; see the list below for details.
(The codename is still not part of the actual sources. That feature will have to wait for 2.15.0, "Easter Beagle").
This release also marks the 3rd anniversary of R-1.0.0.
You
2011 Oct 31
0
R 2.14.0 is released
The byte pixies have rolled up R-2.14.0.tar.gz (codename "Great Pumpkin") at 9:00 this morning. This is a development release with several new features; see the list below for details.
You can get it from
http://cran.r-project.org/src/base/R-2/R-2.14.0.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you.
Binaries for various platforms will appear in due course.
For
2011 Oct 31
0
R 2.14.0 is released
The byte pixies have rolled up R-2.14.0.tar.gz (codename "Great Pumpkin") at 9:00 this morning. This is a development release with several new features; see the list below for details.
You can get it from
http://cran.r-project.org/src/base/R-2/R-2.14.0.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you.
Binaries for various platforms will appear in due course.
For
2010 Nov 29
1
Basic Question about Upgrading to Newer Version of R
Hey Everyone,
I'm using Ubuntu and used the Ubuntu Software Center to put R on my computer (version 2.10.1). It has been working great for what I've needed it for. However, I think now that I need a newer version so that a particular function in a new script I'd like to use can be found: rasterImage. My basic question is how do I upgrade from 2.10.1 to 2.12.0? The problems I'm