How to Analyze P-Graphs with Pajek

Run Pajek using as input a *.GED  file or a *.Net file made for pajek. If you are starting from a p-graph, download - pg2pajek and run the fortran utility to convert from pgraph to pajek *.Net file format. This keeps the pgraph conventions where couples or families are the vertices. There are five options of the conversion program, but it is best to use option a for keeping the orientations on the two types of arcs. There are also options for given different colors to different types of (e.g., male, female) arcs (or edges), but the colors will not show up until you Export the graphic to *.EPS (or *.VRML?) format. The definition of colors is written in DAWNET.PRO, or at the beginning of any *.EPS file you export.

To create a 3D p-graph
1. Click the left button opposite Network, click your *.Net or *.GED file to open.
2. Click Net/Partition/Depth to create a partition by generations.
3. Click Draw/Draw Partitions and /Layers/Type of Layout/3D
4. Click Layers/in z direction to add partition layers to the z dimension
5. Click Energy/Options/Starting Position/Given Z
6. Click Energy 2D Fruchterman-Reingold/...wait/Continue iterations
7. Click Spin/1 0 0/100 to rotate to a 3D representation.
OR: Click Options/ScrollBars (they appear to upper left)
THEN: Click Options/Select All, and use the ScrollBars to rotate in 3D
You can also spin in all three directions by pressing or holding the keys X, Y, Z and rotating around axis defined by the key S: spinning around as normally defined by (default 1 1 1).
When the part of picture is selected (you select area with right mouse button), scrollbars are used for travelling left/right or up/down.

To see only the largest connected component
8. Click Net/Components/WEAK (creates a new partition)
9. Click Operations/Extract From Network/Partition
10. Click Net/PartitionS/Depth
11. Click Draw/Draw PartitionS

To create a 3D p-graph for only the largest bi-component
1. Click the left button opposite Network, click your *.Net or *.GED file to open.
2. Click Net/Components/BiComponents (creates hierarchy)
3. DoubleClick Window 5 (Hierarchy) to bring up a new Window showing clusters
4. Click +Root in this new Window to expand the complete list of bi-components.
Note the number of the one with the largest size, for example.
5. Click Hierarchy/Extract Cluster (and give the Cluster Number that you want to see)
6. Click Operations/Extract From Network/Cluster
7. Click Draw (see Draw operations above)
8. Click Net/Partitions/Depth to create a partition by generations.
9. Click Draw/Draw Partitions
10. Click Layers/in z Direction to fix generations in Z dimension
Or: Spin/Spin Around/1 0 0/90 to flatten layers to the Z dimension
and Then: Click Energy/Options/StartingPositions/Given Z
11. Click Energy 2D Fruchterman-Reingold/...wait/Continue iterations
see also Animation of Kamada-Kawai graph drawing algorithm Pierluigi Crescenzi - Camil Demetrescu - Irene Finocchi. ...
12. See #7 in first set of instructions to Spin the image

On Stopping and Restarting 2D Energy Iterations
1. As you run 2D Energy iterations, you are asked to stop or continue every 20 sec.
2. You can stop, save the Network, load it at a later time, and set Energy/Options/StartingPositions to xy. It will resume where you left off.

On Export to Graphics formats
1. Click Export/EPS or PS or VRML to create a graphics file to save your output.
2. The circles for vertices in 3D get smaller in size as they recede, but this does not come through unless you Export/WYSIWYG (Draw/Export/OptionsOnOff will cause options to change if you change size of vertices).

VRML can be viewed on the web using the Cosmo Player plugin for your browser or in viewers like HiJaakPro.

Note on using *.ged file input to Pajek: 5 output vectors are given for the dates of birth of the husband and the wife, their dates of death, and their date of marriage. Pajek reads the LAST FOUR DIGITS (or if only two, as in 1601/02, it ADDS 1900 and results in an error). Hence for date ranges write 1601 AND 1602 or BET 1601 AND 1605 for correct conversion of dates.

back to toolkit