I have asked a similar question before.

In that question I pointed out that the following code does not work:

graph1 = Labeled[Graphics[Circle[{0, 0}]], "Circle"];
graph2 = Labeled[Graphics[Circle[{0, 0}]], "Circle 2"];
Graphics[{graph1, graph2}]

The accepted solution to my question is to use Inset.

But as I pointed out in another post, it's a bit difficult to control the relative sizes of combined graphs.

So here's the question can you turn Labeled[...] into graphics primitives so we can easily combine them?


1 Answer 1

labeledToGraphics[tr_: {0, 0}] := # /. 
    Labeled[g_, l_] :> Graphics[Translate[{g[[1]], Text[l, {0, -1.2}, Center]}, tr]] &;

Show[labeledToGraphics[] @ graph1, labeledToGraphics[{2.5, 0}] @ graph2]

enter image description here


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.