[R] Party plots

Achim Zeileis Achim.Zeileis at wu-wien.ac.at
Thu Sep 3 20:18:54 CEST 2009


On Thu, 3 Sep 2009, AnnieE wrote:

> I'm pretty new to R, and not much of a progammer (yet).  I'm having trouble
> navigating the graphical output for the party algorithm.  Essentially, my
> tree is too large for the default page size so the nodes overlap and obscure
> one another.  Anybody know how to change the plot parameters to either:
>     1) enlarge the page size so the default font fits comfortably
> (preferred);

You can easily plot into a large PDF, e.g., something like this

   pdf(file = "foo.pdf", height = 15, width = 20)
   plot(foo)
   dev.off()

and then view the PDF in an external viewer, zooming into parts of a tree 
etc. Depending on the size of the tree in "foo", you might have to adjust 
height/width accordingly.

>     2) shrink the graphics to fit the default page size (I worry that this
> might make exports illegibly small); or
>     3) show the tree in sections (not optimal, but servicable).

This is both a bit cumbersome in the current implementation. If you want 
to play around, you can use the re-implementation in package "partykit" on 
R-Forge which has more flexible plotting facilities. However, there is 
still not much documentation, yet. Hence, I would recommend to try the 
solution above to see whether it suits your needs...

hth,
Z




More information about the R-help mailing list