I'm trying to some features to my Matplotlib chart, i wanted to create a series of small squares on different part of the chart.
Here is what the docs say: The example below illustrates plotting several lines with different format styles in one command using arrays.
import numpy as np
# evenly sampled time at 200ms intervals
t = np.arange(0., 5., 0.2)
# red dashes, blue squares and green triangles
plt.plot(t, t, 'r--', t, t**2, 'bs', t, t**3, 'g^')
plt.show()
My problem is: i don't need a line of squares, i only need to add one at a certain place of X, Y coordinates, but the issue i'm having is finding a way to make it smaller, here is what i tried:
plt.plot(138, 9400, 'bs',linewidth=1.0)
I tried to set linewidth to different values, but nothing changes. The docs are a bit vague on this, can anyone tell me how can i set width, height and color of the squares?
plt.scatter(x,y, marker='s', c='b', s=10). Thes=parameter controls the size. Note that it is relative to the area of the little square, not to the side length. Also, the size is relative to screen space, not to the data as displayed in the axes.sis very smallplt.scatter(np.random.rand(100000), np.random.rand(100000), marker=',', c='b', s=0.001, ec='none')