I have some random graphics with specified ImageSize
and AspectRatio
, e.g., this line
g1 = Graphics[Line[{{1, 0}, {2, 1}, {3, 0}, {4, 1}}], ImageSize -> 230, AspectRatio -> 1/2]
and some text
g2 = Text[Style["1+1", Red, Large, Bold], Background -> LightRed]
as shown below:
How do I "overlay" the text g2
ontop of g1
and specify the relative position? For example, I want the center of g2
to be located at {1/3,7/8}
of g1
, which means 1/3 the width and 7/8 of the height of g1
, both measured from the lower left corner of g1
. By doing this, the text g2
will be just below the first peak of g1
. How can this be done?