[Python] Problem with subplot code and integer error

Discussão em 'Python' iniciado por Stack, Janeiro 29, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to run the following code:

    plt.figure()
    subplotsize = np.ceil(np.sqrt(len(localpeaks)))

    imRawMovie = io.imread('DNAPAINT_substack.tiff')
    singleFrameRawMovie = imRawMovie[30,:,:]


    for l in range(0, len(localpeaks)):
    #Extract the ROI - we know it is centered around the localpeaks[l,:] position, with radius ROIradius
    ROI = singleFrameRawMovie[localpeaks[l,0]-ROIradius:localpeaks[l,0]+ROIradius+1,
    localpeaks[l,1]-ROIradius:localpeaks[l,1]+ROIradius+1]
    #Show the ROIs in a subplot image
    plt.subplot(subplotsize,subplotsize,l+1)
    plt.imshow(ROI,cmap='gray')


    I am getting an error regarding integer. How can I solve this issue? I am also attaching a screenshot of the error:

    [​IMG]

    I have tried finding the error but I failed.

    Continue reading...

Compartilhe esta Página