Re: [Matplotlib-users] plot dict

2011-03-30 Thread xyz
On 03/30/2011 05:01 AM, Paul Ivanov wrote: Michael Droettboom, on 2011-03-29 10:12, wrote: On 03/29/2011 09:08 AM, xyz wrote: Hi, X and Y values are stored in a dict whereas X is the key and Y is the value in the following code: import matplotlib.pyplot as plt data = {4: 3, 5: 4, 6: 5,

[Matplotlib-users] plot dict

2011-03-29 Thread xyz
Hi, X and Y values are stored in a dict whereas X is the key and Y is the value in the following code: import matplotlib.pyplot as plt data = {4: 3, 5: 4, 6: 5, 7: 4, 8: 5} print data for i in sorted(data.keys()): print i How is possible to use plot with a dict in order to get a similar

Re: [Matplotlib-users] plot dict

2011-03-29 Thread Michael Droettboom
In this case, you should be able to use: plt.plot(data.items()) Mike On 03/29/2011 09:08 AM, xyz wrote: Hi, X and Y values are stored in a dict whereas X is the key and Y is the value in the following code: import matplotlib.pyplot as plt data = {4: 3, 5: 4, 6: 5, 7: 4, 8: 5} print

Re: [Matplotlib-users] plot dict

2011-03-29 Thread Paul Ivanov
Michael Droettboom, on 2011-03-29 10:12, wrote: On 03/29/2011 09:08 AM, xyz wrote: Hi, X and Y values are stored in a dict whereas X is the key and Y is the value in the following code: import matplotlib.pyplot as plt data = {4: 3, 5: 4, 6: 5, 7: 4, 8: 5} print data for i in