简体   繁体   中英

Line Plot in R with two y-axes using twoord.plot: Values of first y-axis missing

I wanted to create a plot with two different y-axes using the code below:

twoord.plot(lx = stack_question$year, ly = stack_question$size, ry =stack_question$density , rx = stack_question$year)

However, the y-axis on the lefthand side misses the values. What is the best way to resolve that issue?

在此处输入图像描述

My dataset looks like this.

 year size    density
1 1975  144 0.06116022
2 1980  164 0.10030097
3 1985  168 0.11203907
4 1990  171 0.14876726
5 1995  173 0.15874613
6 2000  192 0.21369396
7 2005  193 0.23662855
8 2010  195 0.29243307
9 2015  196 0.30810454

Many thanks in advance!

Try add limits for the left axe:

lylim=c(100,200)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM