0

I want to plot a set of 3D coordinates in a scatter plot and add information from another array of the same size (h_m), using a colorbar. I've followed the example in question Python 3d scatterplot colormap issue:

cmhot = plt.get_cmap("hot")
ax.scatter(x, y, z, marker='o', size=10, c=h_m, cmap=cmhot)

I get AttributeError: Unknown property size

3
  • 2
    It should be s=10 and not size=10 Commented Dec 7, 2014 at 11:12
  • size does not seem to be a valid keyword Commented Dec 7, 2014 at 11:12
  • @Alessandra Ferri: If my answer worked, could it be accepted? Commented Dec 7, 2014 at 14:26

1 Answer 1

2

If you can see in the matplotlib documentation of scatter HERE IN THIS WEBSITE you will find that you give your input in scatter by the keyword s and not by size.

If you change it to s=10 it will work!

To see more about how the size parameter works, please refer to this PREVIOUS ANSWER POSTED IN STACKOVERFLOW

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.