# [SciPy-user] plot curve of a series of equations

Bevan Jenkins bevan.jenkins@ew.govt...
Wed Apr 22 23:24:02 CDT 2009

```Hello,

I have a series of equations that describe a curve.  Each equation is only
valid for a range of x values.  For example:

Equation	                                         Upperlimit Lowerlimit
24 + 18.75 * x + 4.79616e-013 * x ** 2 + 31.25 * x ** 3	   7.800      7.600
28 + 22.5 * x + 5.68434e-013 * x ** 2 + 0 * x ** 3	   8.000      7.800

There is a lower limit for eqn1, after that the upper limit of the previous
eqn is lower of the next.

>From (X) scale linear, To (Y) scale linear
y = A0 + A1(x) + A2(x)2 + A3(x)3
where:    x= value – LL

LL = the lower limit of the applicable equation

I would like to generate a sequence of values (linspace(min(lowerlimit),max
(upperlimit)), work out x (x=value-approriate lower limit) and then using the
appropriate equation generate the y values.
Below is the answer I am looking for

Value	x	y
7.600	0	24.000
7.650	0.05	24.941
7.700	0.1	25.906
7.750	0.15	26.918
7.800	0.2	28.000
7.850	0.050	29.125
7.900	0.100	30.25
7.950	0.150	31.375
8.000	0.200	32.5

Thanks for any help,

Bevan Jenkins

```