code: def _pixelsize(self, p):
          
          xpixelsize = 1./float(p.xdensity)
          ypixelsize = 1./float(p.ydensity)
          return max([xpixelsize,ypixelsize])
docs: Calculate line width necessary to cover at least one pixel on all axes.