Re: [Rd] using rasterImage within image

2011-02-14 Thread Ben Bolker
On 02/14/2011 02:59 PM, Simon Urbanek wrote: > > On Feb 14, 2011, at 2:28 PM, Paul Murrell wrote: > >> Hi >> >> On 15/02/2011 8:11 a.m., Simon Urbanek wrote: >>> >>> On Feb 14, 2011, at 12:26 PM, Ben Bolker wrote: >>> Paul Murrell auckland.ac.nz> writes: > > Hi > >>>

Re: [Rd] using rasterImage within image

2011-02-14 Thread Simon Urbanek
On Feb 14, 2011, at 2:28 PM, Paul Murrell wrote: > Hi > > On 15/02/2011 8:11 a.m., Simon Urbanek wrote: >> >> On Feb 14, 2011, at 12:26 PM, Ben Bolker wrote: >> >>> Paul Murrell auckland.ac.nz> writes: >>> Hi On 12/02/2011 7:22 p.m., Michael Sumner wrote: > Hello,

Re: [Rd] using rasterImage within image

2011-02-14 Thread Paul Murrell
Hi On 15/02/2011 8:11 a.m., Simon Urbanek wrote: On Feb 14, 2011, at 12:26 PM, Ben Bolker wrote: Paul Murrell auckland.ac.nz> writes: Hi On 12/02/2011 7:22 p.m., Michael Sumner wrote: Hello, that appears to have fixed it. Thank you very much. I can now repeat the reported workflow and

Re: [Rd] using rasterImage within image

2011-02-14 Thread Simon Urbanek
On Feb 14, 2011, at 12:26 PM, Ben Bolker wrote: > Paul Murrell auckland.ac.nz> writes: > >> >> Hi >> >> On 12/02/2011 7:22 p.m., Michael Sumner wrote: >>> Hello, that appears to have fixed it. Thank you very much. >>> >>> I can now repeat the reported workflow and the image appears on the >>

Re: [Rd] using rasterImage within image

2011-02-14 Thread baptiste auguie
On 14 February 2011 18:26, Ben Bolker wrote: > Paul Murrell auckland.ac.nz> writes: > >> >> Hi >> >> On 12/02/2011 7:22 p.m., Michael Sumner wrote: >> > Hello, that appears to have fixed it. Thank you very much. >> > >> > I can now repeat the reported workflow and the image appears on the >> > fi

Re: [Rd] using rasterImage within image

2011-02-14 Thread Ben Bolker
Paul Murrell auckland.ac.nz> writes: > > Hi > > On 12/02/2011 7:22 p.m., Michael Sumner wrote: > > Hello, that appears to have fixed it. Thank you very much. > > > > I can now repeat the reported workflow and the image appears on the > > fifth (and subsequent) calls. > > Great. Thanks for chec

Re: [Rd] using rasterImage within image

2011-02-13 Thread Paul Murrell
Hi On 12/02/2011 7:22 p.m., Michael Sumner wrote: Hello, that appears to have fixed it. Thank you very much. I can now repeat the reported workflow and the image appears on the fifth (and subsequent) calls. Great. Thanks for checking. Paul Cheers, Mike. sessionInfo() R version 2.13.0 Un

Re: [Rd] using rasterImage within image

2011-02-11 Thread Michael Sumner
Hello, that appears to have fixed it. Thank you very much. I can now repeat the reported workflow and the image appears on the fifth (and subsequent) calls. Cheers, Mike. sessionInfo() R version 2.13.0 Under development (unstable) (2011-02-11 r54330) Platform: x86_64-pc-mingw32/x64 (64-bit) lo

Re: [Rd] using rasterImage within image

2011-02-10 Thread Paul Murrell
Hi Just committed another fix that solves this problem for me at least. If you want to test for yourself, the magic revision number that you are looking for is r54330. Thanks again for your help. Paul On 10/02/2011 7:54 p.m., Michael Sumner wrote: Hello, I'm afraid the SDI graphics issue

Re: [Rd] using rasterImage within image

2011-02-10 Thread Paul Murrell
Hi On 10/02/2011 7:54 p.m., Michael Sumner wrote: Hello, I'm afraid the SDI graphics issue is still a problem in 2.13.0 2011-02-09 r54308. Bother. Thanks very much for testing. I'll keep looking. Paul To reproduce, in a fresh R session (Windows in SDI mode): ## create a dummy dataset m<-

Re: [Rd] using rasterImage within image

2011-02-09 Thread Michael Sumner
Hello, I'm afraid the SDI graphics issue is still a problem in 2.13.0 2011-02-09 r54308. To reproduce, in a fresh R session (Windows in SDI mode): ## create a dummy dataset m<- matrix(c(0.2, 0.4, 0.6, 0.8), 2, 2) ## simple helper function to open the windows() device and plot the matrix draw.f<-

Re: [Rd] using rasterImage within image

2011-02-09 Thread baptiste auguie
Dear all, Back when grid.raster() was introduced, it was suggested that perhaps grid.rect() could use grid.raster() in case of even spacing. The response at the time was that it would be best to keep the two functions separate at a lower level, that is grid.rect() and grid.raster(), but perhaps a

Re: [Rd] using rasterImage within image

2011-02-09 Thread Michael Sumner
Regarding the SDI problem, I'll check that as soon as the next snapshot build of 2.13.0 is available from CRAN (probably a few days from now, unless I can manage to compile it myself). Cheers, Mike. On Thu, Feb 10, 2011 at 9:29 AM, Ben Bolker wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: S

Re: [Rd] using rasterImage within image

2011-02-09 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11-02-09 03:09 PM, Henrik Bengtsson wrote: > On Wed, Feb 9, 2011 at 11:53 AM, Simon Urbanek > wrote: >> >> On Feb 9, 2011, at 2:36 PM, Henrik Bengtsson wrote: >> >>> On Wed, Feb 9, 2011 at 11:25 AM, Simon Urbanek >>> wrote: Ben, >>>

Re: [Rd] using rasterImage within image

2011-02-09 Thread Henrik Bengtsson
On Wed, Feb 9, 2011 at 11:53 AM, Simon Urbanek wrote: > > On Feb 9, 2011, at 2:36 PM, Henrik Bengtsson wrote: > >> On Wed, Feb 9, 2011 at 11:25 AM, Simon Urbanek >> wrote: >>> Ben, >>> >>> I have committed something analogous to R-devel (your rotation code was not >>> unlike mine, I replicated t

Re: [Rd] using rasterImage within image

2011-02-09 Thread Simon Urbanek
On Feb 9, 2011, at 2:36 PM, Henrik Bengtsson wrote: > On Wed, Feb 9, 2011 at 11:25 AM, Simon Urbanek > wrote: >> Ben, >> >> I have committed something analogous to R-devel (your rotation code was not >> unlike mine, I replicated the color handling from R internals to be >> consistent, I fixed

Re: [Rd] using rasterImage within image

2011-02-09 Thread Henrik Bengtsson
On Wed, Feb 9, 2011 at 11:25 AM, Simon Urbanek wrote: > Ben, > > I have committed something analogous to R-devel (your rotation code was not > unlike mine, I replicated the color handling from R internals to be > consistent, I fixed the drawing limits and added a check for x/y > conformance). N

Re: [Rd] using rasterImage within image

2011-02-09 Thread Simon Urbanek
Ben, I have committed something analogous to R-devel (your rotation code was not unlike mine, I replicated the color handling from R internals to be consistent, I fixed the drawing limits and added a check for x/y conformance). Note that useRaster can only be used when x, y form a regular grid.

Re: [Rd] using rasterImage within image

2011-02-09 Thread Ben Bolker
On 11-02-08 10:03 PM, Simon Urbanek wrote: > Ben, > > did you actually look at the result of your function with useRaster=TRUE ? ;) > [Hint: don't use an image that is symmetric] > > Apart from that nice bug there are more issues as well, try > image(matrix(1:4,2),col=1:3) > The underlying issue

Re: [Rd] using rasterImage within image

2011-02-08 Thread Paul Murrell
Hi On 9/02/2011 3:51 p.m., Michael Sumner wrote: Hello, There's a problem for rasterImage when used in SDI mode in Windows, which may be worth considering. https://stat.ethz.ch/pipermail/r-sig-geo/2010-July/008820.html I had off-list emails with Duncan Murdoch and Paul Murrell about this and

Re: [Rd] using rasterImage within image

2011-02-08 Thread Simon Urbanek
Ben, did you actually look at the result of your function with useRaster=TRUE ? ;) [Hint: don't use an image that is symmetric] Apart from that nice bug there are more issues as well, try image(matrix(1:4,2),col=1:3) The underlying issue is that as.raster() is not quite what you would hope. Unf

Re: [Rd] using rasterImage within image

2011-02-08 Thread Michael Sumner
Hello, There's a problem for rasterImage when used in SDI mode in Windows, which may be worth considering. https://stat.ethz.ch/pipermail/r-sig-geo/2010-July/008820.html I had off-list emails with Duncan Murdoch and Paul Murrell about this and they determined that it was in SDI only, and there's

[Rd] using rasterImage within image

2011-02-08 Thread Ben Bolker
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("