8
$\begingroup$

If I use Epilog->Inset within a Plot, the coordinates specified within that Inset match those of the plot's axis and scale:

Plot[y = 2 x, {x, 0, 5}, Epilog -> Inset["Text", {3, 3}]]

Plot Epilog Inset

Note that "Text" is placed at x=3, y=3. Different thing happens for when Inset is used within LogPlot:

LogPlot[y = x^x, {x, 0, 5}, Epilog -> Inset["Text", {3, 3}]]

LogPlot Epilog Inset

The coordinates are still (3,3) but "Text" is positioned at what appears to be (3,20) with respect to the on-axis coordinates.

What is it about and how do I counter it?

Thanks in advance, r.

$\endgroup$
2
  • 2
    $\begingroup$ True. This is because Log[20.]=2.99573227355399 You can either use Inset["Text", {3, Log[3]}] or I think using Scaled[] is better. I do not know of a way myself to have the scaling of outer coordinates be automatically reflected in the Epilog. You have to do it your self or using Scaled[] $\endgroup$
    – Nasser
    Nov 10, 2013 at 18:12
  • $\begingroup$ Sweet and simple. Thanks, Nasser! $\endgroup$
    – rythin
    Nov 10, 2013 at 18:54

1 Answer 1

5
$\begingroup$

This is just to get an answer on record so the question can be removed from not-answered list.

As Nasser remarked in his comment

This is because Log[20.] = 2.99573227355399 You can either use Inset["Text", {3, Log[3]}] or I think using Scaled[] is better. I do not know of a way myself to have the scaling of outer coordinates be automatically reflected in the Epilog. You have to do it your self or using Scaled[].

$\endgroup$

Your Answer

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

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