[R-sig-Geo] no plots into viewport

Gabor Grothendieck ggrothendieck at gmail.com
Wed May 2 14:32:14 CEST 2007


Missed this but just noticed it when Roger replied.  Try:

print(plot, newpage = FALSE)

On 02 May 2007 11:45:07 +0100, Michal Gallay
<mgallay01 at queens-belfast.ac.uk> wrote:
> Dear R Users,
>
> could anyone help me and explain why no plot with 'plot'function is plotted
> in the viewport, but as a single plot on the next page?
>
> grid.text() works, but neither xyplot() nor plot() do.
>
> library(graphics)
> library(grid)
> library(lattice)
>
> top.vp <- viewport(layout = grid.layout(1,2))
> vp.plot1 <- viewport(layout.pos.col=1,layout.pos.row=1, name="vp.plot1")
> vp.plot2 <- viewport(layout.pos.col=2,layout.pos.row=1, name="vp.plot2")
> splot <- vpTree(top.vp, vpList(vp.plot1, vp.plot2))
>
> pushViewport(splot)
> seekViewport("vp.plot1")
> grid.text("plot1 should be here")
> plot <- xyplot(1:10~1:10)
> print(plot)
>
> Thank you very much for advice.
>
> Michal
>
>
>
> --
> Michal Gallay
>
> Postgraduate Research Student
> School of Geography, Archaeology and Palaeoecology
> Queen's University
> Belfast BT7 1NN
> Northern Ireland
>
> Tel: +44(0)2890 273929
> Fax: +44(0)2890 973212
> email: mgallay01 at qub.ac.uk
> www: www.qub.ac.uk/geog
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>




More information about the R-sig-Geo mailing list