class_docstr: This class implements the functionalities to use Matplotlib with SymPy
  plotting functions.
class_docstr_tok: ["This","class","implements","the","functionalities","to","use","Matplotlib","with","SymPy","plotting","functions","."]
docstr: Convert two list of coordinates to a list of segments to be used
  with Matplotlib's :external:class:`~matplotlib.collections.LineCollection`.
  
  Parameters
  ==========
      x : list
          List of x-coordinates
  
      y : list
          List of y-coordinates
  
      z : list
          List of z-coordinates for a 3D line.
docstr_tok: ["Convert","two","list","of","coordinates","to","a","list","of","segments","to","be","used","with","Matplotlib","'s",":","external",":","class",":","`","~matplotlib.collections.LineCollection","`",".","Parameters","==========","x",":","list","List","of","x-coordinates","y",":","list","List","of","y-coordinates","z",":","list","List","of","z-coordinates","for","a","3D","line","."]
code: def get_segments(x, y, z=None):
      """Convert two list of coordinates to a list of segments to be used
      with Matplotlib's :external:class:`~matplotlib.collections.LineCollection`.
  
      Parameters
      ==========
          x : list
              List of x-coordinates
  
          y : list
              List of y-coordinates
  
          z : list
              List of z-coordinates for a 3D line.
      """
      np = import_module("numpy")
      if z is not None:
          dim = 3
          points = (x, y, z)
      else:
          dim = 2
          points = (x, y)
      points = np.ma.array(points).T.reshape(-1, 1, dim)
      return np.ma.concatenate([points[:-1], points[1:]], axis=1)
  
file_path: sympy/sympy/plotting/backends/matplotlibbackend/matplotlib.py
imports: from collections.abc import Callable
  from sympy.core.basic import Basic
  from sympy.external import import_module
  import sympy.plotting.backends.base_backend
  from sympy.printing.latex import latex
label_desc: Use image node_id 3 for calling the MatplotlibBackend obj's underlying member method code with example usage: obj.get_segments(x, y, z) and returns: np