|
From: John H. <jdh...@ac...> - 2005-03-01 14:34:38
|
>>>>> "kristen" == kristen kaasbjerg <co...@ya...> writes:
kristen> Hi everyone Does anyone know how to asign different
kristen> patches in legend when plotting 2 or more histograms in
kristen> the same figure. I've tried:
kristen> legend((patches1,patches2),(hist1,hist2)) ,
kristen> but this gives the same patches in the legend inset.
I'm assuming patches1 and patches2 are the return values from hist, in
which case they are each a *list* of patches. What you want to do is
pass a *single* item from each of those lists as representative
patches.
legend( (patches1[0],patches2[0]), ('label1', 'label2') )
Next time if you post a more complete code snippet, I won't have to
guess what patches1 and patches2 are!
Hope this helps,
JDH
|