I changed the levels of the factor to desired ordering before using the ggplot2\'s facet_wrap. It works fine as in the first example.
ggplot2
facet_wrap
In th