R Tips

Plots

Legends

Usually, R creates legends in a single column. If you want to have multiple columns in the legend (in base R), use ncol in the legend command. Link.

Axes

If the text on an axis’s ticks is too wide, use str_wrap from stringr to wrap it. Link.

When you are trying to shrink the text on x-axis labels, use cex.names. Link.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *