Yes, I noticed the same and indeed I used sorted values in original problem
I forgot to add it in my simplified snippet

On Sat, Sep 17, 2011 at 10:34 PM, John Hunter <jdh2...@gmail.com> wrote:
>
> While this is safe because calls to keys and values will return lists
> in congruent order of no intervening dict modifications are made
>
> http://stackoverflow.com/questions/835092/python-dictionary-are-keys-and-values-always-the-same-order
>
> it is a bit fragile because there is no guarantee the dict keys will
> be ordered, right, which is probably not what the OP wants.  Maybe
>
>  x = sorted(d.keys())
>  y = [d[k] for k in x]
>  plot(x, y)
>

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to