parameters: (self, statecontainer, points=None, line_opts=None)
docstring: Draw process or cycle from x and y values in axis units
  
          Parameters
          ----------
          statecontainer : CoolProp.Plots.SimpleCycles.StateContainer()
              A state container object that contains all the information required to draw the process.
              Note that points that appear several times get added to a special of highlighted points.
          line_opts : dict
              Line options (please see :func:`matplotlib.pyplot.plot`), optional
              Use this parameter to pass a label for the legend.
  
          Examples
          --------
          >>> import CoolProp
          >>> from CoolProp.Plots import PropertyPlot
          >>> pp = PropertyPlot('HEOS::Water', 'TS', unit_system='EUR')
          >>> pp.calc_isolines(CoolProp.iP        )
          >>> pp.calc_isolines(CoolProp.iHmass    )
          >>> pp.calc_isolines(CoolProp.iQ, num=11)
          >>> cycle = SimpleRankineCycle('HEOS::Water', 'TS', unit_system='EUR')
          >>> T0 = 300
          >>> pp.state.update(CoolProp.QT_INPUTS,0.0,T0+15)
          >>> p0 = pp.state.keyed_output(CoolProp.iP)
          >>> T2 = 700
          >>> pp.state.update(CoolProp.QT_INPUTS,1.0,T2-150)
          >>> p2 = pp.state.keyed_output(CoolProp.iP)
          >>> cycle.simple_solve(T0, p0, T2, p2, 0.7, 0.8, SI=True)
          >>> cycle.steps = 50
          >>> sc = cycle.get_state_changes()
          >>> pp.draw_process(sc)
          >>> # The same calculation can be carried out in another unit system:
          >>> cycle.simple_solve(T0-273.15-10, p0/1e5, T2-273.15+50, p2/1e5-5, 0.7, 0.8, SI=False)
          >>> sc2 = cycle.get_state_changes()
          >>> pp.draw_process(sc2, line_opts={'color':'blue', 'lw':1.5})
          >>> pp.show()
docstring_summary: Draw process or cycle from x and y values in axis units
docstring_tokens: Draw process or cycle from x and y values in axis units
function: def draw_process(self, statecontainer, points=None, line_opts=None):
          """ Draw process or cycle from x and y values in axis units
  
          Parameters
          ----------
          statecontainer : CoolProp.Plots.SimpleCycles.StateContainer()
              A state container object that contains all the information required to draw the process.
              Note that points that appear several times get added to a special of highlighted points.
          line_opts : dict
              Line options (please see :func:`matplotlib.pyplot.plot`), optional
              Use this parameter to pass a label for the legend.
  
          Examples
          --------
          >>> import CoolProp
          >>> from CoolProp.Plots import PropertyPlot
          >>> pp = PropertyPlot('HEOS::Water', 'TS', unit_system='EUR')
          >>> pp.calc_isolines(CoolProp.iP        )
          >>> pp.calc_isolines(CoolProp.iHmass    )
          >>> pp.calc_isolines(CoolProp.iQ, num=11)
          >>> cycle = SimpleRankineCycle('HEOS::Water', 'TS', unit_system='EUR')
          >>> T0 = 300
          >>> pp.state.update(CoolProp.QT_INPUTS,0.0,T0+15)
          >>> p0 = pp.state.keyed_output(CoolProp.iP)
          >>> T2 = 700
          >>> pp.state.update(CoolProp.QT_INPUTS,1.0,T2-150)
          >>> p2 = pp.state.keyed_output(CoolProp.iP)
          >>> cycle.simple_solve(T0, p0, T2, p2, 0.7, 0.8, SI=True)
          >>> cycle.steps = 50
          >>> sc = cycle.get_state_changes()
          >>> pp.draw_process(sc)
          >>> # The same calculation can be carried out in another unit system:
          >>> cycle.simple_solve(T0-273.15-10, p0/1e5, T2-273.15+50, p2/1e5-5, 0.7, 0.8, SI=False)
          >>> sc2 = cycle.get_state_changes()
          >>> pp.draw_process(sc2, line_opts={'color':'blue', 'lw':1.5})
          >>> pp.show()
  
          """
          warnings.warn("You called the function \"draw_process\", which is not tested.", UserWarning)
  
          # Default values
          line_opts = line_opts or {'color': 'r', 'lw': 1.5}
  
          dimx = self.system[self.x_index]
          dimy = self.system[self.y_index]
  
          marker = line_opts.pop('marker', 'o')
          style = line_opts.pop('linestyle', 'solid')
          style = line_opts.pop('ls', style)
  
          if points is None: points = StateContainer()
  
          xdata = []
          ydata = []
          old = statecontainer[len(statecontainer) - 1]
          for i in statecontainer:
              point = statecontainer[i]
              if point == old:
                  points.append(point)
                  old = point
                  continue
              xdata.append(point[self.x_index])
              ydata.append(point[self.y_index])
              old = point
          xdata = dimx.from_SI(np.asarray(xdata))
          ydata = dimy.from_SI(np.asarray(ydata))
          self.axis.plot(xdata, ydata, marker='None', linestyle=style, **line_opts)
  
          xdata = np.empty(len(points))
          ydata = np.empty(len(points))
          for i in points:
              point = points[i]
              xdata[i] = point[self.x_index]
              ydata[i] = point[self.y_index]
          xdata = dimx.from_SI(np.asarray(xdata))
          ydata = dimy.from_SI(np.asarray(ydata))
          line_opts['label'] = ''
          self.axis.plot(xdata, ydata, marker=marker, linestyle='None', **line_opts)
function_tokens: def draw_process ( self , statecontainer , points = None , line_opts = None ) : warnings . warn ( "You called the function \"draw_process\", which is not tested." , UserWarning ) # Default values line_opts = line_opts or { 'color' : 'r' , 'lw' : 1.5 } dimx = self . system [ self . x_index ] dimy = self . system [ self . y_index ] marker = line_opts . pop ( 'marker' , 'o' ) style = line_opts . pop ( 'linestyle' , 'solid' ) style = line_opts . pop ( 'ls' , style ) if points is None : points = StateContainer ( ) xdata = [ ] ydata = [ ] old = statecontainer [ len ( statecontainer ) - 1 ] for i in statecontainer : point = statecontainer [ i ] if point == old : points . append ( point ) old = point continue xdata . append ( point [ self . x_index ] ) ydata . append ( point [ self . y_index ] ) old = point xdata = dimx . from_SI ( np . asarray ( xdata ) ) ydata = dimy . from_SI ( np . asarray ( ydata ) ) self . axis . plot ( xdata , ydata , marker = 'None' , linestyle = style , * * line_opts ) xdata = np . empty ( len ( points ) ) ydata = np . empty ( len ( points ) ) for i in points : point = points [ i ] xdata [ i ] = point [ self . x_index ] ydata [ i ] = point [ self . y_index ] xdata = dimx . from_SI ( np . asarray ( xdata ) ) ydata = dimy . from_SI ( np . asarray ( ydata ) ) line_opts [ 'label' ] = '' self . axis . plot ( xdata , ydata , marker = marker , linestyle = 'None' , * * line_opts )