X Tutup
Skip to content

%matplotlib notebook show nothing, both 2d and 3d plot #8508

@secsilm

Description

@secsilm

%matplotlib notebook show nothing while %matplotlib inline work. I'm using Chrome.

2D plot

from sklearn.manifold import TSNE
from sklearn.datasets import load_digits
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import seaborn

digits = load_digits()
X = digits.data
y = digits.target

trans = TSNE().fit_transform(X)

plt.scatter(trans[:, 0], trans[:, 1], s=4, c=y)

Actual outcome

2d

3D plot

from sklearn.manifold import TSNE
from sklearn.datasets import load_digits
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import seaborn

digits = load_digits()
X = digits.data
y = digits.target

trans1 = TSNE(n_components=3).fit_transform(X)

fig = plt.figure()
ax = Axes3D(fig)
ax.scatter(trans1[:, 0], trans1[:, 1], trans1[:, 2])
plt.show()

Actual outcome

3d

Matplotlib version

  • Matplotlib version: 2.0.0
  • How did you install Matplotlib and Python (pip, anaconda, from source ...): anaconda

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

      X Tutup