[RQt-devel] mosaiq

Michael Lawrence lawrence.michael at gene.com
Mon Sep 27 22:48:31 CEST 2010


On Mon, Sep 27, 2010 at 11:56 AM, Deepayan Sarkar <deepayan.sarkar at gmail.com
> wrote:

> Hi,
>
> mosaiq is up and running again, more or less as it was back in DSC 2009.
>
> I will keep working to improve it. The most distracting oddity at the
> moment is that the space allocation for rows / columns in the
> QGraphicsLayout seems to depend on the number of layers (or
> something). E.g.,
>
> tmp <- rlnorm(100)
> df <- data.frame(x = runif(200),
>                 y = c(tmp, 2 * tmp),
>                 g = gl(2, 100))
>
> ## No axis on bottom row (OK without the 'alternating' argument)
> library(mosaiq)
> mosaiq.xyplot(x, y, margin = ~g, data = df, layout = c(1, 2),
>              alternating = list(y = c(1, 0)))
>
>
> I have been using QGridLayout::setRowStretchFactor() etc. to control
> the spacing. Any suggestions for alternatives?
>
>
I've not had enough time to play around with the layout. There have been
many examples from others where the layout behaves strangely, and I don't
really have an explanation.

The row/col stretch factors are the most obvious way to control the packing
of the rows and columns. In theory, the grid layout is considering the size
request of the widget, but in some simple attempts I did not have much luck
playing with that.



>
> Another thing I find less than ideal is that there are way too many
> calls to the paintFun. This is a problem when individual panels are
> expensive to draw. A simple demo (using 'df' above):
>
> mosaiq.xyplot(x, y+runif(length(y)), margin = ~g, data = df, layout =
> c(1, 1, 2))
>
> Switching between the tabs cause a repaint each time, which I think
> should be avoided if possible. This is of course a silly example, but
> see the last example in mosaiq/demo/maps.R for a real example where
> redrawing is visibly slow.
>
> Isn't it possible to set up a cache mode where such repaints are
> redrawn from a pixmap rather than causing an R callback? On my (KDE)
> system the redraw really seems to be triggered by a change in focus to
> or from the view (even if the window is completely visible while that
> happens), but not by expose events.
>
>
There is a cache mode, just pass cache=TRUE to qlayer(). Note that this will
basically require clip=TRUE, since the cache surface will be maximally
allocated to the size of the layer. Clipping can cause issues.



> -Deepayan
> _______________________________________________
> Qtinterfaces-devel mailing list
> Qtinterfaces-devel at lists.r-forge.r-project.org
>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/qtinterfaces-devel/attachments/20100927/1bd93478/attachment.htm>


More information about the Qtinterfaces-devel mailing list