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

Display is not clear #128

Open
qiangchi opened this issue Sep 28, 2021 · 3 comments
Open

Display is not clear #128

qiangchi opened this issue Sep 28, 2021 · 3 comments

Comments

@qiangchi
Copy link

image
image

@tboggs
Copy link
Member

tboggs commented Sep 28, 2021

What happens if you set the interpolation to "nearest"?

view2 = spy.imshow(classes=gt, title='gt', interpolation='nearest')

@qiangchi
Copy link
Author

如果将插值设置为“最近”会发生什么?

view2 = spy.imshow(classes=gt, title='gt', interpolation='nearest')

Thank you, the problem is solved as well.I would also like to ask how the legend of the image is displayed? I tried to add the lable property but it doesn't seem to work.

@tboggs
Copy link
Member

tboggs commented Sep 29, 2021

The module does not currently have a way to display a color legend. If that is something you need, you could call spy.get_rgb instead, which accepts the same parameters, then render the returned image with matplotlib, and create your own legend using the colors indexed in spy.spy_colors. The color at position i in spy_colors corresponds to value i in gt.

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