what I am trying to do is this :
How do I extend my plot so that the legend is above my data points, but inside the plot?
what I am trying to do is this :
How do I extend my plot so that the legend is above my data points, but inside the plot?
Use the command xlim(0, 100)
to set x-limits (or ax.set_xlim(0, 100)
if you are using the object-oriented style of programming matplotlib)
A better way would be to specify the size of your canvas by inches. So the fonts (default is 10 points, look smaller and so do the data points). You can choose any size you want,
# in this case 3 inches times 3 inches
fig = pyplot.figure(figsize=(3,3))
ax = fig.add_subplot(111)
but be warned, you should then save your images to files instead trying to view them with show().
fig.savefig('mycoolgraph.png') # you could also you vector formats like PDF or SVG...
See also this question about saving the legend outside the figure.