[RQt-devel] par(xpd=NA) and the layout approach in qtpaint

Michael Lawrence lawrence.michael at gene.com
Wed Sep 1 23:51:51 CEST 2010


On Wed, Sep 1, 2010 at 10:42 AM, Yihui Xie <xie at yihui.name> wrote:

> I'm in favor of cache=TRUE whereas clip=FALSE; at least we (ISU
> graphics group) use caching very often to develop interactive
> graphics, but clip=TRUE, on the other hand, often has annoying and
> unexpected consequences, e.g. the elements you draw do not show up at
> the expected locations.
>
> Regards,
> Yihui
> --
> Yihui Xie <xieyihui at gmail.com>
> Phone: 515-294-2465 Web: http://yihui.name
> Department of Statistics, Iowa State University
> 2215 Snedecor Hall, Ames, IA
>
>
>
> On Wed, Sep 1, 2010 at 10:55 AM, Hadley Wickham <hadley at rice.edu> wrote:
> >> I would suggest turning off caching, i.e., pass cache=FALSE to qlayer,
> at
> >> least for the two axes. The issue, I think, is that Qt will only
> allocate a
> >> buffer large enough for the layer. You're then drawing outside of the
> cache,
> >> and it never makes it to the screen. I might make clip and cache both
> >> default to FALSE.  Caching usually only makes sense when there is a
> dynamic
> >> overlay on the layer. This is usually not the case for axes.
> >
> > This seems counterintuitive - you'd normally expect that cache to be
> > most helpful when you're not updating the layer very often?
> >
>

You want cache when you are not updating a layer often, but you do need to
redraw it, i.e., it has something dynamic on top of it (or under it, but
that's less common).

cache=TRUE slows down static rendering. For example, resizing a static plot
will be slower with caching.

Michael

> Hadley
> >
> > --
> > Assistant Professor / Dobelman Family Junior Chair
> > Department of Statistics / Rice University
> > http://had.co.nz/
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/qtinterfaces-devel/attachments/20100901/031adab6/attachment.htm>


More information about the Qtinterfaces-devel mailing list