PieDonut how to change color of pie and donut
ON this page, a nice solution is provided for altering colors and then removing the plotting code to allow for multipanel plotting. However, when i try this code, i get an error —
“Error in complete(df3, donut, pie) : could not find function “complete””
However,this is not an error i get with the original code function PieDonut(). So, i think the “complete” function is not the actual problem, and therefore something else is going on with the customization. Any thoughts or remedies to:
- effectively set color scheme using something like the phrasing of —
myColors <- brewer.pal(12, “Paired”)
names(myColors) <- levels(data$classes) - Then integrate that into the base code for the setting colors as a selected color palette.
- The freedom to plot multiple piedonuts using ggarrange or par.
I tried using the custom code and then adapting to my purpose. Then i reverted back to the code for new function in the feed. Worked with different color palette coding to customize, and then got the “complete” function error.
Jason Schmidt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.