Josh
Josh

Reputation: 12781

Each marker with a different color

In a similar vein to: Matplotlib scatterplot; colour as a function of a third variable, can one specify the color of each marker separately in a regular `ax.plot() (i.e. without using a scatterplot).

If I try:

cmap  = sns.color_palette("Greys",5)
color = np.array(cmap)[[0,4],:]

ax.plot(X, Y, color=color, markersize=12, marker='o', linewidth=0)

I get:

ValueError: to_rgba: Invalid rgba arg "[[ 0.91252596  0.91252596  0.91252596]

Upvotes: 3

Views: 4858

Answers (1)

Ted Petrou
Ted Petrou

Reputation: 61947

Its not possible to plot different markets with plot(). That is the whole point of scatter - you get more options. To make custom markers see this question.

Upvotes: 4

Related Questions