I want to plot a grid where each node in the grid is drawn by a dot, with a certain color code (taken from a vector stored in the node).
If you want to control the marker size precisely and have it scale with the figure, you can use a patch instead of a regular marker. Here's an example:
from matplotlib import pyplot as plt
from matplotlib.patches import Circle
x = [1, 2, 3, 4, 5]
y = [1, 3, 1, 2, 4]
colors = [10, 215, 30, 100]
cmap = plt.cm.jet
fig = plt.figure()
ax = fig.add_subplot(111, aspect='equal')
for (x, y, c) in zip(x, y, colors):
ax.add_artist(Circle(xy=(x, y), radius=0.5, color=cmap(c)))
ax.set_xlim(0, 6)
ax.set_ylim(0, 6)
plt.show()
You could also use a rectangle instead of a circle.