I am struggling to figure how to customise colors. Here is an example :
vtree(mtcars, "cyl am",rootfillcolor="yellow")
How to customise colors of "cyl" and am.
I want to cyl : 4="blue", 6="green",8="yellow"
and to am 0="pink" and 1="brown"
I am struggling to figure how to customise colors. Here is an example :
vtree(mtcars, "cyl am",rootfillcolor="yellow")
How to customise colors of "cyl" and am.
I want to cyl : 4="blue", 6="green",8="yellow"
and to am 0="pink" and 1="brown"
Copyright © 2021 Jogjafile Inc.
You could specify the sorted colors:
Or if you need a proper mapping, you could use something like this:
Of course this could be further improved so that
mtcars$cyl
andmtcars$am
are automatically derived.