<br><br><div class="gmail_quote">On Mon, Sep 27, 2010 at 11:56 AM, Deepayan Sarkar <span dir="ltr"><<a href="mailto:deepayan.sarkar@gmail.com">deepayan.sarkar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
mosaiq is up and running again, more or less as it was back in DSC 2009.<br>
<br>
I will keep working to improve it. The most distracting oddity at the<br>
moment is that the space allocation for rows / columns in the<br>
QGraphicsLayout seems to depend on the number of layers (or<br>
something). E.g.,<br>
<br>
tmp <- rlnorm(100)<br>
df <- data.frame(x = runif(200),<br>
y = c(tmp, 2 * tmp),<br>
g = gl(2, 100))<br>
<br>
## No axis on bottom row (OK without the 'alternating' argument)<br>
library(mosaiq)<br>
mosaiq.xyplot(x, y, margin = ~g, data = df, layout = c(1, 2),<br>
alternating = list(y = c(1, 0)))<br>
<br>
<br>
I have been using QGridLayout::setRowStretchFactor() etc. to control<br>
the spacing. Any suggestions for alternatives?<br>
<br></blockquote><div><br>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.<br><br>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.<br>
<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Another thing I find less than ideal is that there are way too many<br>
calls to the paintFun. This is a problem when individual panels are<br>
expensive to draw. A simple demo (using 'df' above):<br>
<br>
mosaiq.xyplot(x, y+runif(length(y)), margin = ~g, data = df, layout =<br>
c(1, 1, 2))<br>
<br>
Switching between the tabs cause a repaint each time, which I think<br>
should be avoided if possible. This is of course a silly example, but<br>
see the last example in mosaiq/demo/maps.R for a real example where<br>
redrawing is visibly slow.<br>
<br>
Isn't it possible to set up a cache mode where such repaints are<br>
redrawn from a pixmap rather than causing an R callback? On my (KDE)<br>
system the redraw really seems to be triggered by a change in focus to<br>
or from the view (even if the window is completely visible while that<br>
happens), but not by expose events.<br>
<br></blockquote><div><br>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.<br>
<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
-Deepayan<br>
_______________________________________________<br>
Qtinterfaces-devel mailing list<br>
<a href="mailto:Qtinterfaces-devel@lists.r-forge.r-project.org">Qtinterfaces-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel</a><br>
</blockquote></div><br>