2
I am working with Décision Tree and at the end I have the chart that represents it. However, as it is a different object from other types of the ggplot or ggpubr family, I am not able to save by the script. The solution has been by the Export/Save Image button.
This solution limits some things, among them the automation of the process. What is the solution to this problem?
# Exemplo para geração do plot
require(rpart.plot)
binary.model <- rpart(survived ~ ., data = ptitanic, cp = .02)
rpart.plot(binary.model,
main = "titanic survived\n(binary response)")
rpart.plot(binary.model, type = 3, clip.right.labs = FALSE,
branch = .4,
box.palette = "Grays", # override default GnBu palette
main = "type = 3, clip.right.labs = FALSE, ...\n")
Ok! Solve the save part. However, it just went to the directory. That is, I could not control, for example the width, nor height, as well as the Scale for the resolution of the image. Procedures that are easy on ggplot graphics with ggsave().
– gleidsonmr