whats the best way to invert the legend label order so the 7 is down and the 1 is upstairs?
If you're putting it in numeric and it's a continuous scale, you're better off with scale_fill_continuous(trans = 'reverse')
or scale_colour_continuous
. Using your code, this would give:
ggplot(subset(df,feedback==1&stp>20), aes(x=correct, fill=day, colour=day)) +
geom_histogram(colour="black", binwidth=10) +
facet_grid(day ~ .) +
ggtitle("Over-pronation histogram") +
ylab("Count (150s period)") +
xlab("% Steps in over-pronation")+
scale_fill_continuous(trans = 'reverse')