You could try R (freeware) or S-Plus. Although these are statistical
software, they do produce very nice high level graphics and are very
flexible. You might wish to use the following:
plot(0,0,ylim=c(0,8), xlim=c(-21,21), type="n", main="Fig1: This is a simple
plot", ylab="Name of y-axis", xlab="Name of x-axis")
abline(h= seq(from=0,to=8,by=2),lty=3)
abline(v= seq(from=-20, to=20, by=10),lty=3)
abline(0.98512, 0.00653)
abline(1.58088, 0.16773)
abline(1.283, 0.08713)
The general form for abline function is abline(intercept value, slope value)
but when you put v or h, then it draws vertical or horizontal lines.
The two zero's in the plot( 0, 0, .....) could be arbitarily replaced by
any coordinate as long as type="n" is present which makes the point (0,0)
not to be plotted.
As for Excel, you need to input the required values values of y into
different columns. Then
Insert -> Chart -> Line (now choose the simple straight line picture) and on
Step 2, click on the "series" tab. Here change your category(X) axis label
reference to a column containing the values
-21:21. In my opinion the resulting graph is not as nice as one from R.
---- Original Message -----
From: "Brian McMillan" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Thursday, July 04, 2002 4:38 PM
Subject: QUERY: Software for plotting graphs from y=mx+c
> Hello all,
>
> Does anyone know what software I could use to plot a line from
> just the equation and the range of X and Y values?
>
> I have the equation of three straight lines;
>
> y = 0.00653x + 0.98512
> y = 0.16773x + 1.58088
> and
> y = 0.08713x + 1.283
>
> My X variable ranges from -21 to +21, and my Y variable from 0 to 8.
>
> I know how to plot these lines by hand, and I also know how to plot
> them on Harvard Graphics, but unfortunately our department's
> license for Harvard Graphics ran out and we never got a
> replacement. HG was really good because all you had to do was
> enter the range of X and the equations of the lines and it plotted
> them for you.
>
> Does anyone know if this can be done in Excel or Word?
>
> Thanks in advance,
> Brian
> ___________________________________________________________
>
> Dr Brian McMillan
> Research Fellow
> School of Psychology
> University of Leeds
> Leeds, LS2 9JT, UK
>
> phone: 0113 2335714
> fax: 0113 2335749
> (omit first 0 and add 44 if dialing from outside UK)
> __________________________________________________________
>
|