Reputation: 7755
Treemap
package in R seems to have more features than the treemap
function in portfolio
package. However from the reference manual (which is very good, btw) it does not become clear, whether it is possible to use different color palettes for the first index parameter and use shade (from almost white to the defined color) of a color to map the second index term (vColor
). I am after something like this: http://visualrevenue.com/media/uploaded_images/news-aggregation-treemap.jpg
As an example I would like to have continents with different colors (blue, green, red, etc) while the shading of the color for GNI would be universal (for example on alpha scale). The example is from the reference manual.
data(GNI2010)
# create treemap
tmPlot(GNI2010,
index=c("continent", "iso3"),
vSize="population",
vColor="GNI",
type="value")
Is this possible in current treemap
package or does it need major revisions of tmPlot
code?
Upvotes: 0
Views: 2165
Reputation: 2051
I like your idea very much.
Unfortunately it is not possible with the current version. However, it is certainly possible to implement this feature into tmPlot, although it is not straightforward (but also not that difficult). I'll put in on the todo list for the next update.
Upvotes: 2