The default settings in R create a the plot shown. I need the x axis to be ordered AAA, AA, A+, A, B, C, D, E, F, G, HR. The alphabetical values are credit ratings (variable credrating) and numeric values is the cdr variable. 
The code I have is:
plot(credrating, cdr)

 
    