Skip to content

How to make the title of the result graph change color? #28

@bruce14800

Description

@bruce14800

in main.py line.113 to line.137

I modified some programs but still can't get out.

I modified this code :

   for i in range(10):
        img_path = gallery_path[index[i]]
        
        print(img_path)

        ax = plt.subplot(1, 11, i + 2)
        ax.axis('off')
        plt.imshow(plt.imread(img_path))
        
        if img_path == gallery_label:
            ax.set_title('%d'%(i+1),color='green')
        else:
            ax.set_title('%d'%(i+1),color='red')
            
    fig.savefig("show.png")
    print('result saved to show.png')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions