Ignore:
Timestamp:
03/22/11 15:10:35 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
84458d5f26fe77fe6982a487e8dab650ba9bbe33
Message:

Changed from pylab import * to from matplotlib import pyplot as plt.
Save image to file instead of opening a pylab widget.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/doc/Orange/rst/code/network-constructor.py

    r7332 r7768  
    11import Orange.network 
    2 from pylab import * 
     2 
     3from matplotlib import pyplot as plt 
    34 
    45# vertices are placed randomly in Network constructor 
     
    1415    x1, y1 = net.coors[0][u], net.coors[1][u] 
    1516    x2, y2 = net.coors[0][v], net.coors[1][v] 
    16     plot([x1, x2], [y1, y2], 'b-') 
     17    plt.plot([x1, x2], [y1, y2], 'b-') 
    1718 
    1819# read x and y coordinates to Python list 
     
    2122 
    2223# plot vertices 
    23 plot(x, y, 'ro') 
    24 show() 
     24plt.plot(x, y, 'ro') 
     25plt.savefig("network-constructor.py.png") 
Note: See TracChangeset for help on using the changeset viewer.