Hi Intellipaat Community! I am basically trying to reorder the items in the attached legend to a specific order that I would like to input. The order is Distal, rTub, Mid, Prox.
I have already executed the order function and scale_y_discrete. Scale_y_discrete didn't work because the y-axis is graphing a count frequency, and the data is stored as the text seen in the legend. The code I'm executing is below:
p <- Scaphoid_dataF %>%
ggplot( aes(x=Age, fill = FxLoc, order = )) +
geom_histogram() +
labs(y = "Count of Fractures", x = "Patient Age", title = "Frequency of Fractures vs Age")
p + theme_bw() + scale_fill_grey()