hi all,

suppose i have am plotting several lines using 'plot', some are dashed
(using '--') and some are ordinary solid lines. i am plotting several solid
and several dashed lines, all in different colors, as in:

for n in num_lines:
  # plot dashed line
  plot(line_x[n], line_y[n], '--', color=line_color[n], label="line %d"
%(n))
  # plot ordinary line in different color
  plot(line_x[n], line_y[n], color=other_line_color[n], label="line %d"
%(n))
  ...

If i plot n lines, i don't want the legend to show n-items, giving a
separate key for each line. rather, i want it to display a legend containing
a label for the dashed lines and a label for the solid lines, as in:

Legend:
[-- line of type A
 -  line of type B]

so 2 entries rather than as many entries as i have lines. how can i do this?

finally, how can i make it so the legend does not interfere with the plot?
right now the lines appear "behind" the legend. it'd be great if the legend
could be made to be in the background of the line (i.e. be transparent.)

thank you.
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to