how to order the Heatmap by the names of the Candidates on the y axis ?
This is my current code which does an opposite order comparing to what I want (and I want an order from A to Z by the name):
ggplot(data = primary_results, aes(y = candidate, x = state_abbreviation)) + geom_tile(aes(fill = fraction_votes)) + scale_fill_viridis(option = "plasma") + theme_solarized_2() + xlab("State") + ylab("Candidate") + guides(fill = guide_legend(title="Fraction Votes")) MyCurrentHeatmap:

primary_results$candiate = factor(primary_results$candiate, levels = rev(levels(primary_results$candidate)))or similarly reorder inscale_y_discrete.