Data can be visualized on pathways using colours. A gradient colouring scheme can be used to visualize a range of data on a gene (eg. Fold Change) while a rule can be applied for certain criteria allowing only the genes which qualify to be coloured (e.g P Value < 0.05)

R code:

xml.rpc(server, "PathVisio.createVisualization","/home/anwesha/Results/data.txt.pgex","log2FC","blue,white,red","-2,0,2", "[pvalue] < 0.05","green")

Python code:

>>> server.PathVisio.createVisualization("/home/anwesha/Results/data.txt.pgex","log2FC","blue,white,red","-2,0,2","[pvalue] < 0.05","green")