1

I'm struggling to set a size of matplotlib's scatter plot.

Here, let's consider a way to put a circle in a 2D square cell, and the size of the cell is 10*10. Our aimed radius of the circle is 1.

The code below is my current situation to realize this motivation, except for the radius of the circle:

    import matplotlib.pyplot as plt
    fig = plt.figure(figsize=(5,5))# The unit of this figsize is in inches
    ax = fig.add_subplot(1,1,1)
    ax.set_xlim(0,10)
    ax.set_ylim(0,10)
    ax.scatter(5,5,marker='o',s=1)
    plt.show()

The biggest obstacle is a behavior of s in plt.scatter. What is the unit of s? Points? Inches? What geometrical correspondence does the value of s have?

My question might be solved by previous answers by many gurus. But I couldn't find any question that has exactly the same motivation, so I post this. Thank you in advance!

  • I beg to differ about there not being a similar question: https://stackoverflow.com/q/14827650/2988730. In fact the other poster was able to find more docs than you were apparently. – Mad Physicist Dec 14 '17 at 15:38
  • While it might be that this problem is not solved by any of the answers to that duplicate question, you would need to be very clear about the difference and show *in how far* it is not solved by those. – ImportanceOfBeingErnest Dec 14 '17 at 15:41

0 Answers0