Issue plotting big endian images · Issue #6671 · matplotlib/matplotlib · GitHub
Skip to content

Issue plotting big endian images #6671

Description

@jenshnielsen

Originally reported by Anik Halder on the mailing list http://matplotlib.1069221.n5.nabble.com/IPython-FITS-file-plotting-problem-tp47271.html

Consider this simple example:

import matplotlib.pyplot as plt
import numpy as np

x = np.arange(10)
X, Y = np.meshgrid(x,x)
Z = ((X-5)**2 + (Y-5)**2)**0.5

plt.imshow(Z, origin = "lower")
plt.colorbar()
plt.show()

plt.figure()
plt.imshow(Z.astype('>f8'), origin = "lower")
plt.colorbar()
plt.show()

Which produces:
right
And:
wrong

This works correctly in 1.5.1 so it looks like it's a regression in 2.x

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions