recoded figure for ggplot2 package