Skip to content
Back to formatted view

Raw Message

Message-ID: <scdaaaf3.051@tedmail.lgc.co.uk>
Date: 2010-11-10T14:23:28Z
From: S Ellison
Subject: Plotting 2 Lines on the Same Chart

> When I use
>
>> Plot(series1)
>> lines(series2)
>>
>> The graph will use the y axis scaling for series 1 so some of series
2 is
>> cut off.  How do I control the y axis scaling?
>
>Plot them together as a multivariate series as in the examples
already
>pointed to.


...or try 

plot(series1, type="l", ylim=range(pretty(c(series1, series2))) )
lines(series2)

which gives more-or-less sensible ylim scaling based on all the data.
Adding 0 inside the c() will guarantee that zero is in the vertical
scale, too.


*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}