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-read.py

    r7257 r7768  
    11import Orange.network 
    2 from pylab import * 
     2 
     3from matplotlib import pyplot as plt 
    34 
    45# read network from file 
     
    910    x1, y1 = net.coors[0][u], net.coors[1][u] 
    1011    x2, y2 = net.coors[0][v], net.coors[1][v] 
    11     plot([x1, x2], [y1, y2], 'b-') 
     12    plt.plot([x1, x2], [y1, y2], 'b-') 
    1213 
    1314# read x and y coordinates to Python list 
     
    1617 
    1718# plot vertices 
    18 plot(x, y, 'ro') 
    19 show() 
     19plt.plot(x, y, 'ro') 
     20plt.savefig("network-read.py.png") 
Note: See TracChangeset for help on using the changeset viewer.