original_docstring: 
          This method plots mean flow for a single mesh.
          Flow volume is considered as absolute value.
          Direction of the flow is assumed + if goes from node1 to node2. Instead
          flowDirection is assumed to be -.
          
docstring: This method plots mean flow for a single mesh.
  Flow volume is considered as absolute value.
  Direction of the flow is assumed + if goes from node1 to node2. Instead
  flowDirection is assumed to be -.
docstring_tokens: This method plots mean flow for a single mesh . Flow volume is considered as absolute value . Direction of the flow is assumed + if goes from node1 to node2 . Instead flowDirection is assumed to be - .
code: def PlotFlow(self, meshid):
          '''
          This method plots mean flow for a single mesh.
          Flow volume is considered as absolute value.
          Direction of the flow is assumed + if goes from node1 to node2. Instead
          flowDirection is assumed to be -.
          '''
          try:  
              from matplotlib.pyplot import plot, xlabel, ylabel, title, legend, savefig, close, ylim
          except ImportError:
              MatPlotLibError()
          meshid = str(meshid)
          for element in self.NetworkMesh.Elements:
              if element.Id == meshid:
                  name = self.NetworkGraph.Edges[self.NetworkMesh.MeshToGraph[meshid]].Name
                  dofs = element.GetPoiseuilleDofs()
                          
                  p1 = self.Solutions[(self.DofMap.DofMap[meshid, dofs[0]]),self.CardiacFreq*(self.Cycles-1):]
                  p2 = self.Solutions[(self.DofMap.DofMap[meshid, dofs[1]]),self.CardiacFreq*(self.Cycles-1):]
                  
                  if mean(p1)>=mean(p2):
                      flowDirection = self.flowDirection['(+)']
                      Flow = (p1-p2)/element.R
                  else:
                      flowDirection = self.flowDirection['(-)']
                      Flow = (p2-p1)/element.R
                 
                  print "Flow, MeshId ", element.Id, ' ', element.Name, " = " , mean(Flow)*6e7, "mL/min ", flowDirection
              
          self.dayFlow[meshid] = (round(mean(Flow*6e7),1))
          
          plot(self.t, Flow*6e7, 'r-',linewidth = 3, label = 'Flow Output')   #red line
          minY = 0
          for q in Flow*6e7:
              if q < minY:
                  minY = q
                     
          if minY != 0:
              plot(self.t, zeros(len(Flow)),':',linewidth = 1)
          ylim(ymin=minY)
          xlabel('Time ($s$)')
          ylabel('Volumetric flow rate ($mL/min$)')
          if flowDirection == self.flowDirection['(+)']:
              title ('Flow (+)'+' peak:'+str(round(max(Flow*6e7),1))+' mean:'+str(round(mean(Flow*6e7),1))+' min:'+str(round(min(Flow*6e7),1)))    
          if flowDirection == self.flowDirection['(-)']:
              title ('Flow (-)'+' peak:'+str(round(max(Flow*6e7),1))+' mean:'+str(round(mean(Flow*6e7),1))+' min:'+str(round(min(Flow*6e7),1)))    
          legend()
          savefig(self.f_images + meshid + '_' + name +'_flow.png')
          close()
code_tokens: def PlotFlow ( self , meshid ) : try : from matplotlib . pyplot import plot , xlabel , ylabel , title , legend , savefig , close , ylim except ImportError : MatPlotLibError ( ) meshid = str ( meshid ) for element in self . NetworkMesh . Elements : if element . Id == meshid : name = self . NetworkGraph . Edges [ self . NetworkMesh . MeshToGraph [ meshid ] ] . Name dofs = element . GetPoiseuilleDofs ( ) p1 = self . Solutions [ ( self . DofMap . DofMap [ meshid , dofs [ 0 ] ] ) , self . CardiacFreq * ( self . Cycles - 1 ) : ] p2 = self . Solutions [ ( self . DofMap . DofMap [ meshid , dofs [ 1 ] ] ) , self . CardiacFreq * ( self . Cycles - 1 ) : ] if mean ( p1 ) >= mean ( p2 ) : flowDirection = self . flowDirection [ '(+)' ] Flow = ( p1 - p2 ) / element . R else : flowDirection = self . flowDirection [ '(-)' ] Flow = ( p2 - p1 ) / element . R print "Flow, MeshId " , element . Id , ' ' , element . Name , " = " , mean ( Flow ) * 6e7 , "mL/min " , flowDirection self . dayFlow [ meshid ] = ( round ( mean ( Flow * 6e7 ) , 1 ) ) plot ( self . t , Flow * 6e7 , 'r-' , linewidth = 3 , label = 'Flow Output' ) minY = 0 for q in Flow * 6e7 : if q < minY : minY = q if minY != 0 : plot ( self . t , zeros ( len ( Flow ) ) , ':' , linewidth = 1 ) ylim ( ymin = minY ) xlabel ( 'Time ($s$)' ) ylabel ( 'Volumetric flow rate ($mL/min$)' ) if flowDirection == self . flowDirection [ '(+)' ] : title ( 'Flow (+)' + ' peak:' + str ( round ( max ( Flow * 6e7 ) , 1 ) ) + ' mean:' + str ( round ( mean ( Flow * 6e7 ) , 1 ) ) + ' min:' + str ( round ( min ( Flow * 6e7 ) , 1 ) ) ) if flowDirection == self . flowDirection [ '(-)' ] : title ( 'Flow (-)' + ' peak:' + str ( round ( max ( Flow * 6e7 ) , 1 ) ) + ' mean:' + str ( round ( mean ( Flow * 6e7 ) , 1 ) ) + ' min:' + str ( round ( min ( Flow * 6e7 ) , 1 ) ) ) legend ( ) savefig ( self . f_images + meshid + '_' + name + '_flow.png' ) close ( )
short_docstring: This method plots mean flow for a single mesh.
short_docstring_tokens: This method plots mean flow for a single mesh .
comment: '''
          This method plots mean flow for a single mesh.
          Flow volume is considered as absolute value.
          Direction of the flow is assumed + if goes from node1 to node2. Instead
          flowDirection is assumed to be -.
          '''$SEP$#red line