GGraph How to limit scatterplot regression lines to actual data range?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GGraph How to limit scatterplot regression lines to actual data range?

Art Kendall-2
I am creating a scatter plot with 3 groups and imposed linear regression
fit lines using GRAPH in version 15.

Is there a way in GPL to limit each line to the range of actual data?


Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: GGraph How to limit scatterplot regression lines to actual data range?

Peck, Jon
Yes, you can do this.  Add the following to your GPL.

SCALE: linear(dim(1), dataMaximum(), dataMinimum())

The fit line would be something like
ELEMENT: line(position(smooth.linear(x*y)))
and the SCALE specification will limit the extent of the line.

The SCALE statement does not interfere with the margin specification, so you should still see the axes set off slightly from the points.

HTH,
Jon Peck

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art Kendall
Sent: Wednesday, January 24, 2007 10:52 AM
To: [hidden email]
Subject: [SPSSX-L] GGraph How to limit scatterplot regression lines to actual data range?

I am creating a scatter plot with 3 groups and imposed linear regression
fit lines using GRAPH in version 15.

Is there a way in GPL to limit each line to the range of actual data?


Art Kendall
Social Research Consultants