I am currently trying to reproduce a plot that looks like this:
Ignoring the graduated scales on the right side, there are two y-axes on the graph. X is the VIP score, and the y scale is determined by the weighted sum of absolute regression coefficients, however this scale is NOT visible, and masses are seen on the left y axis. The masses are categorical variables, in this case, that match each value in the continuous variable of weighted sum of absolute regression coefficients.
My question is how do I use ggplot2, or another R package, to reproduce this? Labelling the points directly using ggrepel is not an option as there are too many masses in my dataset. Is there a way to create a scatterplot with two y axes BUT the second y axis is a categorical variable?
Sample data:
Masses Overall VIP1
1 82.07010 38.26669006 1.484957089
2 84.08570 34.22745192 1.328724766
3 95.08570 38.65684978 1.500047945
4 96.08571 13.13685100 0.512968559
5 98.10140 36.07639404 1.400239372
6 99.04410 17.37079280 0.676731759
7 105.07530 9.38047849 0.367677099
8 110.10130 36.66816959 1.423128458
9 111.10160 13.64197654 0.532506138
10 113.06040 10.09391101 0.395271714