Skip to content

Importing spectral breaks matplotlib's plotting abilities #44

@MattFerraro

Description

@MattFerraro

This functions as expected, popping up a graphical plot:

import numpy as np
import matplotlib.pyplot as plt

A = np.array([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
])
plt.imshow(A, interpolation='nearest')
plt.show()

But this suppresses the graphical plot--it never shows up at all.

import spectral as spc      # <-- Only change is the addition of this line
import numpy as np
import matplotlib.pyplot as plt

A = np.array([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
])
plt.imshow(A, interpolation='nearest')
plt.show()

The suppressing behavior is consistent regardless of the import order.

Expected behavior is that importing spectral should have no bearing on the proper functioning of matplotlib's plots.

Working environment is on a mac, El Capitan, invoking from command line as python example.py from iterm2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions