Tuesday, 15 January 2013

How do I omit labels in the R treemap? -



How do I omit labels in the R treemap? -

i've been using r treemap package , have treemap that's 2 levels deep. want sec level labels printed not first.

using illustration in man page:

tmplot(gni2010, index=c("continent", "iso3"), vsize="population", vcolor="gni", type="value")

i want rid of continent labels, retain iso3 labels. apologize in advance if in documents haven't found it.

to remove continent labels, can post hoc edit graph. graph produces grid object. lastly 2 elements of grid object seem country labels. hence can remove them way:

lapply(tail(grid.ls(print=false)$name, 2), grid.remove)

r treemap

No comments:

Post a Comment