3
$\begingroup$

The following code shows three positions for placing the PlotLegends. Weirdly, only in the first case can we see the Inset 'MyLabel' (working in MMA Version 13.1). How to make the Inset visible in the latter cases?

ListLinePlot3D[{{2.1, 2.9, 2.8, 1.9, 1.1, 1.2, 2.1}, {2.2, 2.7, 1.1, 
     2.2, 2.7, 1.1, 2.2}, {2.3, 1.7, 2.3, 1.7, 2.3, 1.7, 2.3}, {2.4, 
     1.0, 2.6, 2.4, 1.0, 2.6, 2.4}}, 
   PlotLegends -> Placed[{"a", "b", "c", "d"}, #], 
   Epilog -> Inset["MyLabel", Scaled[{0.9, 0.1}]], 
   ImageSize -> Medium] & /@ {Before, {Right, 
   Center}, {{0.1, 0.6}, {0, 0}}}

enter image description here

$\endgroup$
3
  • $\begingroup$ Inset[Style["MyLabel", 15], Automatic, Automatic, Automatic, Automatic]. $\endgroup$
    – cvgmt
    Jun 17, 2023 at 4:28
  • $\begingroup$ @cvgmt Those do not produce what Scaled[{0.9, 0.1}] actually specifies, even in your first comment. $\endgroup$
    – xiaohuamao
    Jun 17, 2023 at 4:33
  • $\begingroup$ @cvgmt I don't understand. I want to control where the inset is placed by Scaled[{0.9, 0.1}]. Anything wrong with this? $\endgroup$
    – xiaohuamao
    Jun 17, 2023 at 5:28

2 Answers 2

4
$\begingroup$

{.9,.1} work.

ListLinePlot3D[{{2.1, 2.9, 2.8, 1.9, 1.1, 1.2, 2.1}, {2.2, 2.7, 1.1, 
     2.2, 2.7, 1.1, 2.2}, {2.3, 1.7, 2.3, 1.7, 2.3, 1.7, 2.3}, {2.4, 
     1.0, 2.6, 2.4, 1.0, 2.6, 2.4}}, 
   PlotLegends -> Placed[{"a", "b", "c", "d"}, #], 
   Epilog -> Inset["MyLabel", {.9, .1}, Automatic, Automatic], 
   ImageSize -> Medium] & /@ {Before, {Right, 
   Center}, {{0.1, 0.6}, {0, 0}}}
$\endgroup$
1
  • $\begingroup$ Thank you very much! $\endgroup$
    – xiaohuamao
    Jun 18, 2023 at 0:40
4
$\begingroup$

Replace Scaled[{0.9, 0.1}] with ImageScaled[{0.9, 0.1}] (or with {.9, .1} as in cvgmt's answer) to get

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you. This now makes more sense as it's not very clear to me how {0.9,0.1} could work (maybe undocumented). Do you think it is a bug that Scaled does not work? $\endgroup$
    – xiaohuamao
    Jun 18, 2023 at 0:44

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.