class_docstr: **Bases:** :class:`UIGraphicsItem <pyqtgraph.UIGraphicsItem>`
  
  Displays a rectangular grid of lines indicating major divisions within a coordinate system.
  Automatically determines what divisions to use.
class_docstr_tok: ["*","*","Bases",":","*","*",":","class",":","`","UIGraphicsItem","<","pyqtgraph.UIGraphicsItem",">","`","Displays","a","rectangular","grid","of","lines","indicating","major","divisions","within","a","coordinate","system",".","Automatically","determines","what","divisions","to","use","."]
docstr: Set the pen used to draw the grid.
docstr_tok: ["Set","the","pen","used","to","draw","the","grid","."]
code: def setPen(self, *args, **kwargs):
      """Set the pen used to draw the grid."""
      if kwargs == {} and (args == () or args == ("default",)):
          self.opts["pen"] = fn.mkPen(getConfigOption("foreground"))
      else:
          self.opts["pen"] = fn.mkPen(*args, **kwargs)
  
      self.picture = None
      self.update()
  
file_path: pyqtgraph/pyqtgraph/graphicsItems/GridItem.py
imports: import numpy
  from ..None import functions
  from ..None import getConfigOption
  from ..Point import Point
  from ..Qt import QtCore, QtGui
  from .UIGraphicsItem import UIGraphicsItem
label_desc: Use image node_id 2 for calling the GridItem obj's underlying member method code with example usage: obj.setPen() without return types