Andrew Yuan
Andrew Yuan

Reputation: 229

Getting data of scatter plot other than x,y data

In python, suppose that I were to plot a scatter plot as follows,

sc = plt.scatter(x_data, y_data, c=color_vector, s=size_vector, cmap=cmap, norm=norm)

I know I can get x_data, y_data from sc using sc.get_offsets(), but how about the values color_vector, size_vector?

Upvotes: 2

Views: 131

Answers (1)

Jan Kuiken
Jan Kuiken

Reputation: 2010

I think sc.get_sizes() and sc.get_array() will do the trick.

Upvotes: 1

Related Questions