1
$\begingroup$

Question:

How can I index (like in the example below: "c" and "d") images outside the frame?

enter image description here

I started to code, but I got stuck in the lack of documentation:

state0 = Import[
  "d:\\bitbucket\\monte-carlo-borderline\\pics\\torus-0-l5.png"]
state3 = Import[
  "d:\\bitbucket\\monte-carlo-borderline\\pics\\torus-3-l5.png"]
GraphicsGrid[{{state0, state3}}, Spacings -> {1, 2}, Frame -> All]

Input images:

enter image description hereenter image description here

Part-result:

enter image description here

$\endgroup$
  • $\begingroup$ I don't understand your question, so I can't help you $\endgroup$ – mikado Oct 21 '17 at 17:12
1
$\begingroup$
states = {state0, state1, ImageMultiply[state0, Red], ImageMultiply[state0, Yellow]};
labels = {"(a)", "(b)", "(c)", "(d)"}; 

Labeled

Grid[Partition[Labeled[Show[#, ImageMargins -> {{30, 0}, {0, 0}}], 
 Style[#2, 16], {{Top, Left}}] & @@@
  Transpose[{states, labels}], 2], Spacings -> 5]

enter image description here

Legended

Grid[Partition[Legended[Show[#, ImagePadding -> {{40, 0}, {0, 40}}], 
     Placed[Style[#2, 16], {{0, 1}, {1.1, 0}}]] & @@@ 
   Transpose[{states, labels}], 2], Spacings -> 1]

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ Can you extend it to a 2 x 2 grid solution (a,b,c,d)? Then I accept it. It is OK with the same pictures. $\endgroup$ – pnz Oct 21 '17 at 18:01
  • $\begingroup$ @pnz, please see the update. $\endgroup$ – kglr Oct 21 '17 at 18:14
0
$\begingroup$
Grid[{{Labeled[state0, "state0", {{Top, Left}}], 
       Labeled[state3, "state3", {{Top, Left}}]}}]

Edit:

You can always use Framed to put a frame around each graph individually. E.g.,

Grid[{{Labeled[Framed[state0], "state0", {{Top, Left}}], 
       Labeled[Framed[state3], "state3", {{Top, Left}}]}}]
| improve this answer | |
$\endgroup$
  • $\begingroup$ I try it, but it seems the labels are inside the frame: GraphicsGrid[{{Labeled[state0, "a", {{Top, Left}}], Labeled[state3, "b", {{Top, Left}}]}}, Spacings -> {1, 2}, Frame -> All] $\endgroup$ – pnz Oct 21 '17 at 17:26
  • $\begingroup$ The labels are outside the graphics frame. Naturally, they are inside the grid frame. (How else could that work with e.g. a 2d grid?) You can always use Framed to put a frame around each graph individually. E.g., Grid[{{Labeled[Framed[state0], "state0", {{Top, Left}}], Labeled[Framed[state3], "state3", {{Top, Left}}]}}]. $\endgroup$ – Alan Oct 21 '17 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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