我用以下数据的基本图形覆盖两个条形图(因为它们具有不同的比例,到目前为止,在 ggplot 上执行此操作是一场噩梦):
> str(pidf)
'data.frame': 1300 obs. of 7 variables:
$ spec1 : num 0.00192 0.00213 0.00151 0.00234 0.00133 ...
$ spec2 : num 0.00241 0.00278 0.00189 0.00264 0.00155 ...
$ spec3 : num 0.00231 0.00262 0.00187 0.00274 0.00165 ...
$ spec4 : num 0.00209 0.0026 0.00166 0.00225 0.00165 ...
$ spec5 : num 0.0025 0.00285 0.00188 0.00285 0.00181 ...
$ numbers: int 1 2 3 4 5 6 7 8 9 10 ...
$ ratios : num 0.59 …
Run Code Online (Sandbox Code Playgroud)