-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Description
The following code gives error, but works replacing color= withc=
I suspect is either a bug, or some piece of documentation missing?
I'm using:
matplotlib 1.5.3
pandas 0.19.1
python 3.5
import pandas as pd
import numpy as np
from sklearn.datasets import load_iris
%matplotlib inline
iris = load_iris()
colors = list()
palette = {0: "red", 1: "green", 2: "blue"}
for c in np.nditer(iris.target): colors.append(palette[int(c)])
# using the palette dictionary, we convert
# each numeric class into a color string
dataframe = pd.DataFrame(iris.data,
columns=iris.feature_names)
scatterplot = pd.scatter_matrix(dataframe, alpha=0.3,
figsize=(10, 10), diagonal='hist', color=colors, marker='o', grid=True)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels