data_secure_attach <- data.frame( Response = c('Agree, Secure Description', 'Agree, Insecure Description', 'Disagree, Secure Description', 'Disagree, Insecure Description'), Mean = c(48.841, 51.056, 51.424, 48.507) )
data_insecure_attach <- data.frame( Response = c('Agree, Secure Description', 'Agree, Insecure Description', 'Disagree, Secure Description', 'Disagree, Insecure Description'), Mean = c(52.127, 48.433, 49.563, 51.601) )
plot_secure_attach <- ggplot(data_secure_attach, aes(x=Response, y=Mean, fill=Response)) + geom_bar(stat="identity") + ggtitle("Mean Scores for Secure Attachment Style") + xlab("Response and Description Type") + ylab("Mean Score") + theme_minimal() + theme(axis.text.x = element_text(angle = 45, hjust = 1))
print(plot_secure_attach)

plot_insecure_attach <- ggplot(data_insecure_attach, aes(x=Response, y=Mean, fill=Response)) + geom_bar(stat="identity") + ggtitle("Mean Scores for Insecure Attachment Style") + xlab("Response and Description Type") + ylab("Mean Score") + theme_minimal() + theme(axis.text.x = element_text(angle = 45, hjust = 1))
print(plot_insecure_attach)

ggsave("secure_attachment_style.png", plot=plot_secure_attach, width=10, height=5)
ggsave("insecure_attachment_style.png", plot=plot_secure_attach, width=10, height=5)