[Rd] Inconsistencies in device_Raster when axes are reflected

From: Sharpie <chuck_at_sharpsteen.net>
Date: Wed, 11 Jan 2012 10:11:19 -0800 (PST)


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 file, `quartz(file = 'test.pdf', type = 'pdf')`, it will produce horizontal reflections and ignore vertical ones.

When the `xlim` or `ylim` is reversed, negative widths and heights are passed to the C function `device_Raster`, which is not a behavior documented in `R_ext/GraphicsDevice.h`. Also, the values of `x` and `y` passed to
`device_Raster` will be shifted by the width or height of the image such
that the coordinates no longer reference the bottom-left corner of the image
as `R_ext/GraphicsDevice.h` says they should.

Given the inconsistencies in documentation and behavior, I am wondering what the intended behavior of `device_Raster` is in this situation.

Thanks!

-Charlie



Charlie Sharpsteen
Undergraduate-- Environmental Resources Engineering Humboldt State University
--
View this message in context: http://r.789695.n4.nabble.com/Inconsistencies-in-device-Raster-when-axes-are-reflected-tp4286320p4286320.html
Sent from the R devel mailing list archive at Nabble.com.

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed 11 Jan 2012 - 18:43:03 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 12 Jan 2012 - 05:10:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive