spacipy.Gem.to_img
- Gem.to_img(on=None, bin_size=None, outfile=None, reset_coords=True, pad=0)
Convert gem into image using nCount or nFeature as pixel value.
- Parameters:
on (str, default nCount) – how to represent each pixel of the image, ‘nCount’ or ‘nFeature’
bin_size (int) – group into bins before convert with width and height of bin_size
outfile (str) – save the image
reset_coords (bool, default True) – if True, the DNB/Bin with minimum (x,y) will be the origin point in the output image; if False, the image will start at (0, 0), which counld cause huge image
pad (int) – how many pixels will be padded around the image