Skip to content

Commit b9cf9dd

Browse files
committed
Added RadViz documentation
1 parent 039870b commit b9cf9dd

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

doc/source/visualization.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,3 +341,29 @@ confidence band.
341341
342342
@savefig autocorrelation_plot.png width=6in
343343
autocorrelation_plot(data)
344+
345+
RadViz
346+
~~~~~~
347+
348+
RadViz is a way of visualizing multi-variate data. It is based on a simple
349+
spring tension minimization algorithm. Basically you set up a bunch of points in
350+
a plane. In our case they are equally spaced on a unit circle. Each point
351+
represents a single attribute. You then pretend that each sample in the data set
352+
is attached to each of these points by a spring, the stiffness of which is
353+
proportional to the numerical value of that attribute (they are normalized to
354+
unit interval). The point in the plane, where our sample settles to (where the
355+
forces acting on our sample are at an equilibrium) is where a dot representing
356+
our sample will be drawn. Depending on which class that sample belongs it will
357+
be colored differently.
358+
359+
.. ipython:: python
360+
361+
from pandas import read_csv
362+
from pandas.tools.plotting import radviz
363+
364+
data = read_csv('data/iris.data')
365+
366+
plt.figure()
367+
368+
@savefig radviz.png width=6in
369+
radviz(data, 'Name')

0 commit comments

Comments
 (0)