Albert Au Yeung's Homepage



Notes on Using Pajek

Introduction

Pajek is a software for the Windows operating system. It is mainly designed for the purpose of analysing and visualising complex graphs and networks.


.net File Format

Pajek data files are plain text files. The data (vertices and edges) as well as other attributes (e.g. vertex colour, label font size) of a network is stored in a plain text files with the extension .net. The file should be written in the following format.

* Vertices n
1 "Vertice 1"
2 "Vertice 2"
...
* Edges
1 2
1 3

The upper part of the file specifies the vertices of the network. In particular, n is the number of vertices in the network. This should agree with the number of lines following under the first line. For each line specifying a vertex, the first value is the vertex number (counting from 1), while the second is the vertex label. Besides, there are a set of optional attributes of the vertices that can be specified after the vertex label. The format of a line specifying a vertex is as follows.

vertex_number vertex_label x y shape para1 para1_value ...

x, y are the coordinates of the vertex on the drawing area. They have values between 0 and 1. shape specifies the shape of the vertex, and can take the following values: ellipse, box, diamond, cross, empty. The following table shows the list of parameters, their possible values and explanations.

Parameter Possible Values Explanations
x_fact +ve integer magnification along x-axis
y_fact +ve integer magnification along y-axis
phi 0 to 360 rotation of the vertex
r > 0 radius of corners of rectangular vertices
q > 0 ratio between top and middle side of diamond
ic colours interior colour of the vertex
bc colours colour of the vertex border
bw +ve integer thickness of the vertex border
lc colours colour of the vertex label
la 0 to 360 angle of the vertex label
lr +ve number distance of label from center of vertex
lphi 0 to 360 angle of the vertex label
fos +ve integer font size of the vertex label
font font name font of the vertex label

Colours in Pajek

The colours of vertices, edges, arcs and labels can be specified in the input file. The following figure shows the colours available in Pajek and their corresponding names to be used in the input file.


Useful Links


References

  • W. de Nooy, A. Mrvar and V. Batagelj. 2005. Exploratory Social Network Analysis with Pajek. Cambridge University Press.


Albert Au Yeung 2009