0
$\begingroup$

I have plotted the following:

p1 = Plot[Sin[x], {x, 0, 3 \[Pi]}, PlotStyle -> Red, 
   PlotLabels -> Placed["Cat1", Above]];
p2 = Plot[Cos[x], {x, 0, 6 \[Pi]}, PlotStyle -> Blue, 
   PlotLabels -> Placed["Cat2", Above]];
Show[p1, p2, PlotRange -> All]

which gives:

enter image description here

Now I wonder how one can change the labels into pictures of two cats? link to cat1 and cat2. Surly this might be funny but the point of my question is to know how to label plots using images?

$\endgroup$
3
$\begingroup$

Try this

p1 = Plot[Sin[x], {x, 0, 3 \[Pi]}, PlotStyle -> Red, 
   PlotLabels -> Placed["Cat1", Above]];
p2 = Plot[Cos[x], {x, 0, 6 \[Pi]}, PlotStyle -> Blue, 
   PlotLabels -> Placed[Import["ExampleData/spikey.tiff"], Above]];
Show[p1, p2, PlotRange -> All]

which produces

enter image description here

Now replace the spikey with your cat images.

I'm prompted to wonder aloud that you didn't find this for yourself.

| improve this answer | |
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.