Re: [R] Bar Plot with Connected Points on 1 Y-Axis

2009-01-08 Thread jimdare
Cheers Marc, it works perfectly now. Thanks for your help! Marc Schwartz wrote: You can generalize the approach by using something like: ... ylim = c(0, max(DF$TACC, DF$Catch) * 1.1) ... That would allow you to use the max value of the two columns, multiplied by a fudge

Re: [R] Bar Plot with Connected Points on 1 Y-Axis

2009-01-07 Thread jimdare
Thanks Marc, that has helped a lot. Say, for example, in a situation where I can't find out the highest value, is there any way to get R to automatically detect this and adjust the axis accordingly? I am planning to do this for many different stocks at once and dont wan't to have to define the

Re: [R] Bar Plot with Connected Points on 1 Y-Axis

2009-01-07 Thread Marc Schwartz
You can generalize the approach by using something like: ... ylim = c(0, max(DF$TACC, DF$Catch) * 1.1) ... That would allow you to use the max value of the two columns, multiplied by a fudge factor, which you can adjust as needed. In this case, increasing the y axis range by 10% to make room.

[R] Bar Plot with Connected Points on 1 Y-Axis

2009-01-06 Thread jimdare
Hi Everyone, Have created a bar plot of the data below using the following code: barplot(TACC,space=0,names.arg=Year). I now want to add a series of connected points to represent the catch. I tried to do this using line(Catch) or points(Catch), however both of these commands result in each

Re: [R] Bar Plot with Connected Points on 1 Y-Axis

2009-01-06 Thread Marc Schwartz
on 01/06/2009 09:07 PM jimdare wrote: Hi Everyone, Have created a bar plot of the data below using the following code: barplot(TACC,space=0,names.arg=Year). I now want to add a series of connected points to represent the catch. I tried to do this using line(Catch) or points(Catch),