> On 10.03.06, Alan G Isaac wrote:
>> Has anyone implemented a nice SCATTERPLOT MATRIX?
>> Examples:
>>  http://www.math.sfu.ca/~cschwarz/Stat301/Handouts/node43.html
>> (Tab down once for an pretty good example. Axis labeling
>> would ideally alternate however.)
>>  http://www.ncss.com/scatmatrix.html
>> (Go about half way down; note that including regression
>> lines is a nice option)
>>  http://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/scatplma.htm
>> (Go to the very bottom; this one does the labeling better)
>>  http://www.mrcbsu.cam.ac.uk/bugs/documentation/coda03/node34.html
>> (Interesting approach; I'm uncertain about it however)
On Tue, 14 Mar 2006, Andre Wobst apparently wrote:
> A straight forward way would be to just build up some graphs and link
> the axis between them. See the enclosed example (scatter_linked).
OK, here's a first pass based on that.
(Needs aesthetic improvement but functions.)
Thanks,
Alan
def scatter_plot_matrix(group,figwidth=18,hsep=1,vsep=1):
g_len = len(group)
subplot_size = (figwidth  (g_len1)*hsep)/g_len
c = canvas.canvas()
g_id = range(g_len)
xlinks = []
for yi in g_id[::1]:
for xi in g_id:
xseries = group[xi]
yseries = group[yi]
if xi == 0:
ylinkaxis = None
else:
ylinkaxis = graph.axis.linkedaxis(ylink.axes["y"])
if yi == g_len1:
xlinkaxis = None
else:
xlinkaxis = graph.axis.linkedaxis(xlinks[xi].axes["x"])
newgraph = c.insert(graph.graphxy(width=subplot_size, height=subplot_size,
xpos=(subplot_size+hsep)*xi,
ypos=(subplot_size+vsep)*(g_len1yi),
x = (xlinkaxis or graph.axis.linear()),
y = (ylinkaxis or graph.axis.linear()),
)
)
newgraph.plot(graph.data.list(zip(xseries,yseries), x=1, y=2))
if xi == 0:
ylink = newgraph
if yi == g_len 1:
xlinks.append( newgraph )
return c
