I have six graphs (each roughly fits in a circle with radius 2 at the origin) which I want to combine placing one above the other and then place text on them. I am trying to use Inset as in the following example and the results are utterly unpredictable, PlotRange makes no sense and PlotRange->All does not work. Moreover, I would have expected (and would like) the first graph (disk 1) to use the same coordinates are the final one, the wrapping graphic the coordinates of which the text uses. Any ideas? (Using Ma 10.1)

Example code:

Graphics[{
Table[
Inset[
Graphics[{
Disk[{0, 0}, 2], White, Text[j, {0, 1.5}]
}, Axes -> True,
, {0, 0}, {0, 4 (j - 1)}, 2], {j, 6}],
Gray, Text["Some Text 1", {.4, .4}],
Text["Some Text 2", {.4, .2}]
}, PlotRange -> {Automatic, {1, -11}},
Axes -> True,
AxesOrigin -> {-1, -1}]


## closed as off-topic by m_goldberg, MarcoB, happy fish, Feyre, gwrMar 1 '17 at 10:40

• The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

• What is the function txt? Side note: use  for inline code such as inline code. Otherwise, indent your code with four spaces (or click on the {} icon). – anderstood Feb 25 '17 at 23:12
• Yes, changed txt to Text, sorry. – Nicholas G Feb 26 '17 at 0:01
• @anderstood, how can I change the coordinates of circles 2 through 6 inside a Show? I tried Table[ {Disk[{0, 0}, 2], White, txt[j, {0, 1.5}]} /. {x_Real, y_Real} :> {x, y - 2 j} , {j, 6}] and variants of it but it does not work. – Nicholas G Feb 26 '17 at 0:08
• Pardon me, I don't understand I would have expected (and would like) the first graph (disk 1) to use the same coordinates are the final one, the wrapping graphic the coordinates of which the text uses. Would you please try stating that differently or providing some kind of example? – Mr.Wizard Feb 26 '17 at 0:17
• I'm voting to close this question as off-topic because the issued raised is not really a problem; it is arises from the OP's misunderstanding of the result returned by Mathematica. – m_goldberg Feb 26 '17 at 2:11

Perhaps

Graphics[{Translate[{Opacity[.5, Pink], Disk[{0, 0}, 2],
Opacity[1, Purple], Text[# + 1, {0, 1.5}]}, {0, -4 #}] & /@ Range[0, 5],
Cyan, Text["Some Text 1", {.5, .5}], Text["Some Text 2", {.5, .1}]},
PlotRange -> All, Axes -> True, AxesOrigin -> {-1, -1}]


• One problem. Each circle should have its own Graphics wrapper to simulate the fact that I will be using other graphics, already produced. I do not see how that would work with Translate. If you could wrap Opacity ... Disk... Text... inside a Graphics maybe that would work. – Nicholas G Feb 26 '17 at 1:18
• @NicholasG, you can use Graphics[...][[1]] with Translate. For example, Graphics[{Translate[ Graphics[{Opacity[.5, Pink], Disk[{0, 0}, 2], Opacity[1, Purple], Text[# + 1, {0, 1.5}]}][[1]], {0, -4 #}] & /@ Range[0, 5], Cyan, Text["Some Text 1", {.5, .5}], Text["Some Text 2", {.5, .1}]}, PlotRange -> All, Axes -> True, AxesOrigin -> {-1, -1}]. See also this for a similar use of Translate. – kglr Feb 26 '17 at 1:23
• Fabulous, this works. Why do we have to pass the first element of prior graphics to Translate instead of the prior graphic itself? – Nicholas G Feb 26 '17 at 11:32
• @NicholasG, the first argument of Translate has to be a graphics primitive. – kglr Feb 26 '17 at 11:50

Let us look at your graphics with a few modification to improve the visibility of the elements that are displayed.

Graphics[
{Table[
Inset[
Graphics[
{GrayLevel[.8], Disk[{0, 0}, 2],
White, Text[j, {.5, -1}]},
Axes -> True,
{0, 0}, {0, 4 (j - 1)}, 2],
{j, 6}],
Text["Some Text 1", {.4, .4}],
Text["Some Text 2", {.4, .2}]},
PlotRange -> {{-1, 1}, {1, -11}},
Axes -> True,
AxesLabel -> {"outer-x", "outer-y"},
AxesOrigin -> {-1, -1},
ImagePadding -> {{20, 50}, {Automatic, Automatic}}]


There is nothing at all to complain about in the resulting graphics. Everything is displayed in exactly in the position that was specified for it.

All elements specified in the outer Graphics expression, including the six disks, appear correctly placed in the outer coordinate system. All elements specified in the Inset expression appear correctly placed in the local coordinate system of their inset Graphics expression and are scaled to double size in the outer coordinate system because you specified a scale of 2 for them.

• Bravo! Then, the question becomes what is the correct scaling factor to use so the coordinates for the first graph become those of the outer system. I would have thought 1 might work but no, it ends up being 4. Why? That the width of the inner graph is four and so it should take four units of the outer system? I suppose I should give up on PlotRange->All` just working. – Nicholas G Feb 26 '17 at 10:56