Skip to content
Prev 244509 / 398502 Next

RES: Barplot with "Independent" Lines Y axis

On 2010-12-09 14:22, Rodrigo Aluizio wrote:
If you get an error complaining about needing finite ylim values,
then why not supply them?
This worked for me (after fixing your data which contains
several commas where decimal points are needed) and calling
the data frame 'd':

  with(d,
     twoord.plot(
       lx=1:14, ly=Rain, rx=1:14, ry=Salt,
       lylim=c(0,450), rylim=c(0,20),
       type=c('bar','b')))

(I had to use with(), because the 'data' argument
in twoord.plot seems not to function as intended.)

I have no idea why anyone would want to use a barplot
for the Rain data, but ...

The above should not be taken as an endorsement of
the production of abominable plots (to which, however,
I am becoming inured).

Peter Ehlers