Skip to content

Display is not clear #128

Open
Open

Description

@ccyycc-hash

image
image

Activity

  1. tboggs commented on Sep 28, 2021

    @tboggs
    Member

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

    view2 = spy.imshow(classes=gt, title='gt', interpolation='nearest')
    
  2. ccyycc-hash commented on Sep 29, 2021

    @ccyycc-hash
    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.

  3. tboggs commented on Sep 29, 2021

    @tboggs
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions