/[ascend]/trunk/pygtk/interface/gtkbrowser.py
ViewVC logotype

Diff of /trunk/pygtk/interface/gtkbrowser.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 233 by johnpye, Sun Jan 29 16:55:27 2006 UTC revision 234 by johnpye, Sun Jan 29 17:15:47 2006 UTC
# Line 457  class Browser: Line 457  class Browser:
457          return False          return False
458    
459      def on_tools_sparsity_click(self,*args):      def on_tools_sparsity_click(self,*args):
460            import pylab;
461          self.reporter.reportNote("Preparing sparsity matrix...")          self.reporter.reportNote("Preparing sparsity matrix...")
462          _im = self.sim.getIncidenceMatrix();          _im = self.sim.getIncidenceMatrix();
463          _id = _im.getIncidenceData();          _id = _im.getIncidenceData();
464          print repr(_id);          
465            data = pylab.zeros((_im.getNumCols(), _im.getNumRows()))*0.
466            for i in _id:
467                data[i.col, i.row] = int(i.type)
468    
469            pylab.spy2(data)
470            pylab.ion()
471            pylab.show(False)          
472    
473  #   --------------------------------------------  #   --------------------------------------------
474  #   MODULE LIST  #   MODULE LIST

Legend:
Removed from v.233  
changed lines
  Added in v.234

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22