Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Setting the coordinate reference system #268

Copy link
Copy link
Closed
@EricThomson

Description

@EricThomson
Issue body actions

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

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.