On 26/08/10 01:15, Benjamin Root wrote:
I believe you are asking why the x axis starts at 2? This is because
matplotlib will automatically set the limits of your plot to show all
of your data. If you can control the axes yourself by calling
set_xlim() and/or set_ylim().
ax.set_xlim(0.0,
On Thu, Aug 26, 2010 at 6:18 AM, xyz mit...@op.pl wrote:
On 26/08/10 01:15, Benjamin Root wrote:
I believe you are asking why the x axis starts at 2? This is because
matplotlib will automatically set the limits of your plot to show all
of your data. If you can control the axes yourself by
Thank you, but why the coordinates start from 2 and not from 0 with the
following code?
from pylab import *
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
for i in [[2,2], [2,3], [4.2,3.5]]:
print i[0],i[1]
plt.plot(i[0],i[1],'o')
ax.grid(True)
On Wed, Aug 25, 2010 at 4:53 AM, xyz mit...@op.pl wrote:
Thank you, but why the coordinates start from 2 and not from 0 with the
following code?
from pylab import *
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
for i in [[2,2], [2,3], [4.2,3.5]]:
print
Hello,
the following script creates a legend for only two instead of three
datasets.
---
from pylab import *
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
for i in [[2,2], [2,3], [4.2,3.5]]:
print i[0],i[1]
plt.plot(i[0],i[1],'o')
ax.grid(True)
You have plotted three lines, but only provided legend labels for two of
them. Try:
plt.legend(('Model length', 'Data length', 'Something else'),
'best', shadow=True, fancybox=True)
Mike
On 08/24/2010 06:33 AM, xyz wrote:
Hello,
the following script creates a legend for only