[Tikzdevice-bugs] Error when using raster image and reverting axis

48 views
Skip to first unread message

Romain Franconville

unread,
Jan 7, 2012, 2:44:14 PM1/7/12
to tikzdev...@r-forge.wu-wien.ac.at
Hi all,

I get the following error when using image() with useRaster=TRUE and
reverting one axis using xlim (or ylim). I don't get any error when
using other graphical devices :

> m <- matrix(1,10,10)
> tikz()
> image(m,xlim=c(1,0),useRaster=TRUE)
Error in X11(paste("png::", filename, sep = ""), g$width, g$height,
pointsize, :
invalid 'width' or 'height'


This is R 2.14.1 on linux 64bit, with tikzDevice 0.6.2
Thanks,

Romain
_______________________________________________
Tikzdevice-bugs mailing list
Tikzdev...@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tikzdevice-bugs

Charlie Sharpsteen

unread,
Jan 7, 2012, 5:26:20 PM1/7/12
to tikzd...@googlegroups.com, tikzdev...@r-forge.wu-wien.ac.at
I see a similar error on OS X. The problem is that when the axis is
reversed, R passes a negative width to the C routines. Since the R
documentation made no mention of this behavior, I wrote the raster routines
for tikzDevice under the assumption that width and height were positive
numbers.

Thanks for reporting, this has been logged as issue #53:

https://github.com/Sharpie/RTikZDevice/issues/53

-Charlie

Charlie Sharpsteen

unread,
Jan 10, 2012, 12:12:00 AM1/10/12
to tikzd...@googlegroups.com, tikzdev...@r-forge.wu-wien.ac.at

I just pushed build 0.6.2-63-38eca21 to R-Forge which contains a fix for
this issue. Binaries should be available in a couple of days.

-Charlie

Reply all
Reply to author
Forward
0 new messages