I have this chunk here. Any ideas why I cannot get the x-axis labels to rotate 90 degrees? THere is no error, just unrotated labels on the line chart.
ggplot(data = whole_2profile_model_full,
aes(x = param,
y = est,
group = LatentClass,
color = LatentClass)) +
geom_line(aes(linetype = LatentClass)) +
geom_point() +
labs(title = "Standardized Mean Item Scores",
x = "Scale Item",
y = "Score" ) +
scale_color_brewer(palette = "Paired") +
theme(axis.text.x = element_text(angle = 90)) +
theme_minimal()
FJCC
2
I think the problem is that you are resetting the theme with theme_minimal() after you rotate the text. Try this:
ggplot(data = whole_2profile_model_full,
aes(x = param,
y = est,
group = LatentClass,
color = LatentClass)) +
geom_line(aes(linetype = LatentClass)) +
geom_point() +
labs(title = "Standardized Mean Item Scores",
x = "Scale Item",
y = "Score" ) +
scale_color_brewer(palette = "Paired") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 90))
That was exactly it, thank you!
system
Closed
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.