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

    r7257 r7768  
    11import Orange.network 
    2 from pylab import * 
     2 
     3from matplotlib import pyplot as plt 
    34 
    45# create graph object of type GraphAsList 
     
    2021    x1, y1 = net.coors[0][u], net.coors[1][u] 
    2122    x2, y2 = net.coors[0][v], net.coors[1][v] 
    22     plot([x1, x2], [y1, y2], 'b-') 
     23    plt.plot([x1, x2], [y1, y2], 'b-') 
    2324 
    2425# read x and y coordinates to Python list 
     
    2728 
    2829# plot vertices 
    29 plot(x, y, 'ro') 
    30 show() 
     30plt.plot(x, y, 'ro') 
     31plt.savefig("network-optimization.py.png") 
Note: See TracChangeset for help on using the changeset viewer.