Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bruce14800 opened this issue Dec 29, 2020 · 1 comment
Open

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

bruce14800 opened this issue Dec 29, 2020 · 1 comment

Comments

@bruce14800
Copy link

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')
@GNAYUOHZ
Copy link
Owner

GNAYUOHZ commented May 8, 2021

It's not a technical problem, it's a simple code problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants