Hi:

I'm having a problem where the lines I plot show up in one style (all
solid, with different colors) while the legend shows them to be a
different style (all blue, different dashes). I used the following
code to plot:

labels = []
dir_names = {'U' : 'UP', 'D' : 'DOWN', 'L' : 'LEFT', 'R' : 'RIGHT'}
for dir in lines:
        xa = sorted(lines[dir].keys())
        ya = [lines[dir][x][0] for x in xa]
        yerr = []
        for x in xa:
                if lines[dir][x][1] > lines[dir][x][2]:
                        # no bound data
                        yerr.append([0,0])
                else:
                        yerr.append([lines[dir][x][1] - lines[dir][x][0], 
lines[dir][x][2]
- lines[dir][x][0]])
        yerra = array(yerr).transpose()
        errorbar(xa, ya, yerr=yerra)
        labels.append(dir_names[dir])

legend(labels)
show()


Here's the result:

http://i32.tinypic.com/2eat8r8.jpg

What am I doing wrong?

Thanks for the help.

Joseph

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to