Scatterplots

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

Scatterplots

Thew, Barbara-2

Hi – hope someone can help.

 

My question is: whereabouts am I able to find a tool which will add a circle around particular variables? I don't want a line of best fit - I want to demonstrate how variables group differently to each other within the scatterplot.

 

Any help would be much appreciated

 

Thanks

 

Barbara

Reply | Threaded
Open this post in threaded view
|

Re: Scatterplots

ViAnn Beadle

Can you be a bit more specific. What do you mean by “variables group differently to each other within the scatterplot”—are these your x and y variables?

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Thew, Barbara
Sent: Wednesday, August 26, 2009 5:02 AM
To: [hidden email]
Subject: Scatterplots

 

Hi – hope someone can help.

 

My question is: whereabouts am I able to find a tool which will add a circle around particular variables? I don't want a line of best fit - I want to demonstrate how variables group differently to each other within the scatterplot.

 

Any help would be much appreciated

 

Thanks

 

Barbara

Reply | Threaded
Open this post in threaded view
|

FW: Scatterplots

Daciuk, Tim
In reply to this post by Thew, Barbara-2

 

 

Tim Daciuk

Director, Worldwide Demo Resources

SPSS Inc.

 

 


From: Daciuk, Tim
Sent: Wednesday, August 26, 2009 1:37 PM
To: Thew, Barbara
Subject: RE: Scatterplots

 

Hi Barbara:

I am not really sure what you are looking for.  By definition, a scatterplot uses Cartesian coordinates to display values for two variables (X and Y) for a set of data.  The points that are on the plot area are the combination of at least two different variables. 

 

Now, there are a couple of ways to go about illustrating what I think you are looking for.  First, you could use a 3rd variable, and have that variable coloured to illustrate differences.  Of course, there are variants on this such as shapes, sizes etc.

 

A second approach is to panel the display of a third variable.  This can work for a fourth (fifth, etc.) variable, although comparison of the distributions gets harder and harder.

 

Another approach is to create a 3d scatterplot.  This will show the relationship of 3-4 variables (realistically).  This can be used in conjunction with colouring (second plot) to show an additional variable, or with paneling.  The problem here is that without the ability to post-hoc manipulate the graphic, it is sometimes very hard to see the patterns.

 

In each of these, the plot is a function of variables in combination, so, the ability to add a circle around a variable is not really applicable.  Now, if there are graph regions that you want to emphasize, you can do that by adding a shape as a drawing.

 

I use Snagit by Techsmith (www.techsmith.com) to create the chart drawings from a chart in Viz Designer.  The advantage is that it is quick and easy.  The disadvantage is that there is nothing rigorous about the way in which I have constructed the regions.

 

If you could send me a copy (or a link to) what you are looking for, I may be of more help to you.

 

PS, I would send example images but I think the listserv will reject them.

 

Tim Daciuk

Director, Worldwide Demo Resources

SPSS Inc.

 

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Thew, Barbara
Sent: Wednesday, August 26, 2009 7:02 AM
To: [hidden email]
Subject: Scatterplots

 

Hi – hope someone can help.

 

My question is: whereabouts am I able to find a tool which will add a circle around particular variables? I don't want a line of best fit - I want to demonstrate how variables group differently to each other within the scatterplot.

 

Any help would be much appreciated

 

Thanks

 

Barbara

Reply | Threaded
Open this post in threaded view
|

Re: Scatterplots

Thew, Barbara-2
In reply to this post by Thew, Barbara-2
Tim, thanks for your reply.

What I am trying to find out is, with scatterplots, is there any way of encircling grouped (ie by colour) variables to demonstrate differences in range? Specifically, I'm trying to produce a scatterplot for archaeological artefacts with length (Y axis) and width (x axis) measurements that is grouped by raw material ("set colour"), and I'd like to add ovals around the set colours in order to make clear the different parameters of raw material groups in the scatterplot.

Your reference to "snagit"  is exactly what I am after - but I didn't know if it could be done in SPSS or not.

Many thanks

Barbara

________________________________________
From: Daciuk, Tim [[hidden email]]
Sent: 26 August 2009 18:36
To: Thew, Barbara
Subject: RE:      Scatterplots

Hi Barbara:
I am not really sure what you are looking for.  By definition, a scatterplot uses Cartesian coordinates to display values for two variables (X and Y) for a set of data.  The points that are on the plot area are the combination of at least two different variables.

Now, there are a couple of ways to go about illustrating what I think you are looking for.  First, you could use a 3rd variable, and have that variable coloured to illustrate differences.  Of course, there are variants on this such as shapes, sizes etc.

A second approach is to panel the display of a third variable.  This can work for a fourth (fifth, etc.) variable, although comparison of the distributions gets harder and harder.

Another approach is to create a 3d scatterplot.  This will show the relationship of 3-4 variables (realistically).  This can be used in conjunction with colouring (second plot) to show an additional variable, or with paneling.  The problem here is that without the ability to post-hoc manipulate the graphic, it is sometimes very hard to see the patterns.

In each of these, the plot is a function of variables in combination, so, the ability to add a circle around a variable is not really applicable.  Now, if there are graph regions that you want to emphasize, you can do that by adding a shape as a drawing.

I use Snagit by Techsmith (www.techsmith.com<http://www.techsmith.com/>) to create the chart drawings from a chart in Viz Designer.  The advantage is that it is quick and easy.  The disadvantage is that there is nothing rigorous about the way in which I have constructed the regions.

If you could send me a copy (or a link to) what you are looking for, I may be of more help to you.

PS, I would send example images but I think the listserv will reject them.

Tim Daciuk
Director, Worldwide Demo Resources
SPSS Inc.

<http://www.spss.com>

________________________________
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Thew, Barbara
Sent: Wednesday, August 26, 2009 7:02 AM
To: [hidden email]
Subject: Scatterplots

Hi – hope someone can help.

My question is: whereabouts am I able to find a tool which will add a circle around particular variables? I don't want a line of best fit - I want to demonstrate how variables group differently to each other within the scatterplot.

Any help would be much appreciated

Thanks

Barbara

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Scatterplots

ViAnn Beadle
Here's an example using the edge function in GPL. I use an input program to
simulate some data with overlapping groups:

input program.
loop #i=1 to 50.
compute group=rnd(uniform(2))+ 1.
do repeat var= x y.
compute var=uniform(3)+group/2.
end repeat.
end case.
end loop.
end file.
end input program.
execute.
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=x y group[LEVEL=NOMINAL]
MISSING=LISTWISE
    REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: x=col(source(s), name("x"))
  DATA: y=col(source(s), name("y"))
  DATA: group=col(source(s), name("group"), unit.category())
  GUIDE: axis(dim(1), label("x"))
  GUIDE: axis(dim(2), label("y"))
  GUIDE: legend(aesthetic(aesthetic.color.exterior), label("group"))
  ELEMENT: edge(position(link.hull(x*y)), color(group))
  ELEMENT: point(position(x*y), color(group))
END GPL.

The convex.hull function encloses the set of points for each group.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Thew, Barbara
Sent: Wednesday, August 26, 2009 1:36 PM
To: [hidden email]
Subject: Re: Scatterplots

Tim, thanks for your reply.

What I am trying to find out is, with scatterplots, is there any way of
encircling grouped (ie by colour) variables to demonstrate differences in
range? Specifically, I'm trying to produce a scatterplot for archaeological
artefacts with length (Y axis) and width (x axis) measurements that is
grouped by raw material ("set colour"), and I'd like to add ovals around the
set colours in order to make clear the different parameters of raw material
groups in the scatterplot.

Your reference to "snagit"  is exactly what I am after - but I didn't know
if it could be done in SPSS or not.

Many thanks

Barbara

________________________________________
From: Daciuk, Tim [[hidden email]]
Sent: 26 August 2009 18:36
To: Thew, Barbara
Subject: RE:      Scatterplots

Hi Barbara:
I am not really sure what you are looking for.  By definition, a scatterplot
uses Cartesian coordinates to display values for two variables (X and Y) for
a set of data.  The points that are on the plot area are the combination of
at least two different variables.

Now, there are a couple of ways to go about illustrating what I think you
are looking for.  First, you could use a 3rd variable, and have that
variable coloured to illustrate differences.  Of course, there are variants
on this such as shapes, sizes etc.

A second approach is to panel the display of a third variable.  This can
work for a fourth (fifth, etc.) variable, although comparison of the
distributions gets harder and harder.

Another approach is to create a 3d scatterplot.  This will show the
relationship of 3-4 variables (realistically).  This can be used in
conjunction with colouring (second plot) to show an additional variable, or
with paneling.  The problem here is that without the ability to post-hoc
manipulate the graphic, it is sometimes very hard to see the patterns.

In each of these, the plot is a function of variables in combination, so,
the ability to add a circle around a variable is not really applicable.
Now, if there are graph regions that you want to emphasize, you can do that
by adding a shape as a drawing.

I use Snagit by Techsmith (www.techsmith.com<http://www.techsmith.com/>) to
create the chart drawings from a chart in Viz Designer.  The advantage is
that it is quick and easy.  The disadvantage is that there is nothing
rigorous about the way in which I have constructed the regions.

If you could send me a copy (or a link to) what you are looking for, I may
be of more help to you.

PS, I would send example images but I think the listserv will reject them.

Tim Daciuk
Director, Worldwide Demo Resources
SPSS Inc.

<http://www.spss.com>

________________________________
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Thew, Barbara
Sent: Wednesday, August 26, 2009 7:02 AM
To: [hidden email]
Subject: Scatterplots

Hi - hope someone can help.

My question is: whereabouts am I able to find a tool which will add a circle
around particular variables? I don't want a line of best fit - I want to
demonstrate how variables group differently to each other within the
scatterplot.

Any help would be much appreciated

Thanks

Barbara

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Scatterplots

Ian Martin-2
In reply to this post by Thew, Barbara-2
Ah yes, I remember the good old days of SYSTAT, ca. 1995, when you
could just ask for a 95% confidence ellipses around various groups of
data points in a 2-d scatterplot.  SPSS bought SYSTAT, and that code,
I believe?

I have asked several times for this feature to be added to SPSS, but
to no avail.

regards,
Ian

Ian D. Martin, Ph.D.

Tsuji Laboratory
University of Waterloo
Dept. of Environment & Resource Studies


On 26 Aug, 2009, at 3:36 PM, Thew, Barbara wrote:

> Tim, thanks for your reply.
>
> What I am trying to find out is, with scatterplots, is there any
> way of encircling grouped (ie by colour) variables to demonstrate
> differences in range? Specifically, I'm trying to produce a
> scatterplot for archaeological artefacts with length (Y axis) and
> width (x axis) measurements that is grouped by raw material ("set
> colour"), and I'd like to add ovals around the set colours in order
> to make clear the different parameters of raw material groups in
> the scatterplot.
>
> Your reference to "snagit"  is exactly what I am after - but I
> didn't know if it could be done in SPSS or not.
>
> Many thanks
>
> Barbara
>
> ________________________________________
> From: Daciuk, Tim [[hidden email]]
> Sent: 26 August 2009 18:36
> To: Thew, Barbara
> Subject: RE:      Scatterplots
>
> Hi Barbara:
> I am not really sure what you are looking for.  By definition, a
> scatterplot uses Cartesian coordinates to display values for two
> variables (X and Y) for a set of data.  The points that are on the
> plot area are the combination of at least two different variables.
>
> Now, there are a couple of ways to go about illustrating what I
> think you are looking for.  First, you could use a 3rd variable,
> and have that variable coloured to illustrate differences.  Of
> course, there are variants on this such as shapes, sizes etc.
>
> A second approach is to panel the display of a third variable.
> This can work for a fourth (fifth, etc.) variable, although
> comparison of the distributions gets harder and harder.
>
> Another approach is to create a 3d scatterplot.  This will show the
> relationship of 3-4 variables (realistically).  This can be used in
> conjunction with colouring (second plot) to show an additional
> variable, or with paneling.  The problem here is that without the
> ability to post-hoc manipulate the graphic, it is sometimes very
> hard to see the patterns.
>
> In each of these, the plot is a function of variables in
> combination, so, the ability to add a circle around a variable is
> not really applicable.  Now, if there are graph regions that you
> want to emphasize, you can do that by adding a shape as a drawing.
>
> I use Snagit by Techsmith (www.techsmith.com<http://
> www.techsmith.com/>) to create the chart drawings from a chart in
> Viz Designer.  The advantage is that it is quick and easy.  The
> disadvantage is that there is nothing rigorous about the way in
> which I have constructed the regions.
>
> If you could send me a copy (or a link to) what you are looking
> for, I may be of more help to you.
>
> PS, I would send example images but I think the listserv will
> reject them.
>
> Tim Daciuk
> Director, Worldwide Demo Resources
> SPSS Inc.
>
> <http://www.spss.com>
>
> ________________________________
> From: SPSSX(r) Discussion [mailto:[hidden email]] On
> Behalf Of Thew, Barbara
> Sent: Wednesday, August 26, 2009 7:02 AM
> To: [hidden email]
> Subject: Scatterplots
>
> Hi – hope someone can help.
>
> My question is: whereabouts am I able to find a tool which will add
> a circle around particular variables? I don't want a line of best
> fit - I want to demonstrate how variables group differently to each
> other within the scatterplot.
>
> Any help would be much appreciated
>
> Thanks
>
> Barbara
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text
> except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Scatterplots

Peck, Jon
In reply to this post by ViAnn Beadle
You might also consider filling the area of the convex hull with some transparency in the fill.  Using ViAnn's data, the syntax below will do this.


GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=x y group[LEVEL=NOMINAL] MISSING=LISTWISE
    REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: x=col(source(s), name("x"))
  DATA: y=col(source(s), name("y"))
  DATA: group=col(source(s), name("group"), unit.category())
  GUIDE: axis(dim(1), label("x"))
  GUIDE: axis(dim(2), label("y"))
  GUIDE: legend(aesthetic(aesthetic.color.exterior), label("group"))
  ELEMENT: polygon(position(link.hull(x*y)), color(group),transparency.interior(transparency."0.7"))
  ELEMENT: point(position(x*y), color(group)) END GPL.


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of ViAnn Beadle
Sent: Wednesday, August 26, 2009 3:05 PM
To: [hidden email]
Subject: Re: [SPSSX-L] Scatterplots

Here's an example using the edge function in GPL. I use an input program to
simulate some data with overlapping groups:

input program.
loop #i=1 to 50.
compute group=rnd(uniform(2))+ 1.
do repeat var= x y.
compute var=uniform(3)+group/2.
end repeat.
end case.
end loop.
end file.
end input program.
execute.
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=x y group[LEVEL=NOMINAL]
MISSING=LISTWISE
    REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: x=col(source(s), name("x"))
  DATA: y=col(source(s), name("y"))
  DATA: group=col(source(s), name("group"), unit.category())
  GUIDE: axis(dim(1), label("x"))
  GUIDE: axis(dim(2), label("y"))
  GUIDE: legend(aesthetic(aesthetic.color.exterior), label("group"))
  ELEMENT: edge(position(link.hull(x*y)), color(group))
  ELEMENT: point(position(x*y), color(group))
END GPL.

The convex.hull function encloses the set of points for each group.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Thew, Barbara
Sent: Wednesday, August 26, 2009 1:36 PM
To: [hidden email]
Subject: Re: Scatterplots

Tim, thanks for your reply.

What I am trying to find out is, with scatterplots, is there any way of
encircling grouped (ie by colour) variables to demonstrate differences in
range? Specifically, I'm trying to produce a scatterplot for archaeological
artefacts with length (Y axis) and width (x axis) measurements that is
grouped by raw material ("set colour"), and I'd like to add ovals around the
set colours in order to make clear the different parameters of raw material
groups in the scatterplot.

Your reference to "snagit"  is exactly what I am after - but I didn't know
if it could be done in SPSS or not.

Many thanks

Barbara

________________________________________
From: Daciuk, Tim [[hidden email]]
Sent: 26 August 2009 18:36
To: Thew, Barbara
Subject: RE:      Scatterplots

Hi Barbara:
I am not really sure what you are looking for.  By definition, a scatterplot
uses Cartesian coordinates to display values for two variables (X and Y) for
a set of data.  The points that are on the plot area are the combination of
at least two different variables.

Now, there are a couple of ways to go about illustrating what I think you
are looking for.  First, you could use a 3rd variable, and have that
variable coloured to illustrate differences.  Of course, there are variants
on this such as shapes, sizes etc.

A second approach is to panel the display of a third variable.  This can
work for a fourth (fifth, etc.) variable, although comparison of the
distributions gets harder and harder.

Another approach is to create a 3d scatterplot.  This will show the
relationship of 3-4 variables (realistically).  This can be used in
conjunction with colouring (second plot) to show an additional variable, or
with paneling.  The problem here is that without the ability to post-hoc
manipulate the graphic, it is sometimes very hard to see the patterns.

In each of these, the plot is a function of variables in combination, so,
the ability to add a circle around a variable is not really applicable.
Now, if there are graph regions that you want to emphasize, you can do that
by adding a shape as a drawing.

I use Snagit by Techsmith (www.techsmith.com<http://www.techsmith.com/>) to
create the chart drawings from a chart in Viz Designer.  The advantage is
that it is quick and easy.  The disadvantage is that there is nothing
rigorous about the way in which I have constructed the regions.

If you could send me a copy (or a link to) what you are looking for, I may
be of more help to you.

PS, I would send example images but I think the listserv will reject them.

Tim Daciuk
Director, Worldwide Demo Resources
SPSS Inc.

<http://www.spss.com>

________________________________
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Thew, Barbara
Sent: Wednesday, August 26, 2009 7:02 AM
To: [hidden email]
Subject: Scatterplots

Hi - hope someone can help.

My question is: whereabouts am I able to find a tool which will add a circle
around particular variables? I don't want a line of best fit - I want to
demonstrate how variables group differently to each other within the
scatterplot.

Any help would be much appreciated

Thanks

Barbara

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Scatterplots

Bruce Weaver
Administrator
In reply to this post by Thew, Barbara-2
Thew, Barbara-2 wrote
Hi - hope someone can help.

My question is: whereabouts am I able to find a tool which will add a circle around particular variables? I don't want a line of best fit - I want to demonstrate how variables group differently to each other within the scatterplot.

Any help would be much appreciated

Thanks

Barbara
In an ordinary scatter-plot, there are only two variables, X and Y generically.  So I wonder if you you mean that there are clusters of points in the scatter-plot.  If so, do you want a tool that will work via syntax, or is a manual method OK?  For a manual method, copy the chart and paste it into PowerPoint, where you have all kinds of tools at your disposal.

--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).