I want to add some pictures to my plot and point them to especial part of the graph with the arrow (or maybe something fancier) but I got problem the canvas of my pictures are too big and its cover part of axes and arrow. how can solve this problem? also, I think maybe put the picture in the circle and show them look like magnified part of the graph. is that possible in Mathematica? enter image description here

  • $\begingroup$ You tag image have a alpha channel?I think RemoveBackground can help a little. $\endgroup$
    – yode
    Sep 25, 2016 at 5:17
  • $\begingroup$ Cropping the inset image will surely help a lot. Look at ImageCrop $\endgroup$ Sep 25, 2016 at 7:58

1 Answer 1


First, of all people in MSE need data and/or code to try to help you. So be always aware to ask a question with gives the minimum effort to the one who will try to answer --- I have use an image which was on my computer. In the following case, as I use a random draw to look like your graphic --- I would have used a white noise to be more like yours data ---, the positionning of the elements are always recomputed. So the circle and the arrow will not be where you expect them to be.

But you can change it. Here is the code

\[ScriptCapitalP] = 
TransformedProcess[b[t] + 10, b \[Distributed] WienerProcess[], t];
data = RandomFunction[\[ScriptCapitalP], {0, 4, 0.01}, 1]

Keep those command in a separate cell. Now

a = ListLinePlot[data, AxesOrigin -> {0, 5}, PlotRange -> {5, 13}];
b = Graphics[{Red, Disk[{1., 10.05}, .1]}];
c = Graphics[{Blue, Arrow[{{1.1, 9.8}, {2, 7}}]}];
img = Magnify[Import["C:\\000moi\\ecopub\\moebpeint.jpg"], 0.25];
d = Graphics[Inset[img, {2.4, 6.5}], Frame -> False];
Show[a, b, d, c, AspectRatio -> Automatic]

Here is the result

enter image description here

  • $\begingroup$ Thank you, Cyrille.piatecki for you answer, the data file for this graph is too big I could not upload the data here. $\endgroup$
    – Parviz
    Sep 26, 2016 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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