how do you rotate the column titles in vis_miss (naniar library)? They are tilted in the default settings, I would like the titles to be vertical (parallel to the y-axis of the graph). Thanks for your help!
The current behaviour of vis_miss() is the following:
vis_miss()
library(visdat) vis_miss(airquality)
Created on 2018-11-04 by the reprex package (v0.2.1)
As visdat is built on top of ggplot2, you rotate the y axis labels 90 degrees, like so:
library(visdat) library(ggplot2) vis_miss(airquality) + theme(axis.text.y = element_text(angle = 90))
Which I found from this: Rotating and spacing axis labels in ggplot2
theme(axis.text.x = element_text(angle = 90)) or whatever other angle degree instead of axis.text.y to change the variable labels on top.
theme(axis.text.x = element_text(angle = 90))
axis.text.y
The current behaviour of
vis_miss()
is the following:Created on 2018-11-04 by the reprex package (v0.2.1)
As visdat is built on top of ggplot2, you rotate the y axis labels 90 degrees, like so:
Created on 2018-11-04 by the reprex package (v0.2.1)
Which I found from this: Rotating and spacing axis labels in ggplot2