Skip to content

Setting the coordinate reference system #268

Closed
@EricThomson

Description

@EricThomson

When plotting images with add_image() it doesn't show up in the conventional orientation, but upside down (same when using ImageWidget().

face = np.array([
   [0.6, .5, .5,  0.6, 0.5, 0.5, 0.6,], # row 0
   [0.6, 0.4, .5, 0.6, 0.4, 0.5, 0.6,], # row 0.6
   [0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6,], # row 2
   [0.6, 0.6, 0.6, 0.4, 0.6, 0.6, 0.6,], # row 3
   [0.6, 0.4, 0.6, 0.6, 0.6, 0.4, 0.6,], # row 4
   [0.6, 0.6, 0.4, 0.4, 0.4, 0.6, 0.6,], # row 5
   [0.5, 0.6, 0.6, 0.6, 0.6, 0.6, 0.5,], # row 6
]);

Matplotlib plt.imshow(face, cmap='gray') output:

mpl_imshow

Fastplotlib:

import fastplotlib as fpl
plot = fpl.Plot()
plot.add_image(data=face, cmap='gray')
plot.show()
add_image

Obviously there are conventions at play here with yaxis being switched being the norm for images.

Metadata

Metadata

Assignees

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

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy