6
$\begingroup$

There is a way to align axis/picture in this kind of plot?

blocks = Table[
   Graphics[
    Plot[Sin[π i j x], {x, 0, 1}, 
       PlotRange -> {{0, 1}, {-1, 1}}, 
       Frame -> True,
       FrameTicks -> {{If[j < 2, Automatic, None], None}, 
                      {If[i == 3, Automatic, None], None}}, 
       ImageSize -> 200
   ], 
   PlotRangePadding -> 0, 
   ImagePadding -> 0
  ], {i, 3}, {j, 3}];
myGrid = GraphicsGrid[blocks, Spacings -> {0, 0}, Frame -> None]

enter image description here

Any suggestion?

Thanks!

$\endgroup$
5
$\begingroup$

Specifically I came up with

blocks = Table[
   Plot[Sin[π i j x], {x, 0, 1}, PlotRange -> {{0, 1}, {-1, 1}}, 
    Frame -> True, BaseStyle -> {FontSize -> 15},
    FrameTicks -> {
      {Table[{y, Style[y, If[j == 1, Black, Transparent]]}, {y, -1, 1,
          0.5}], None},
      {Table[{y, Style[y, If[i == 3, Black, Transparent]]}, {y, 0, 1, 
         0.2}], None}
      },
    ImageSize -> 400, Epilog -> Inset[{i, j}, {0.5, 0}]], {i, 3}, {j, 3}];
myGrid = GraphicsGrid[blocks, Spacings -> {-25, -5}, Frame -> None]

It does but it is also tricky.

Mathematica graphics

I've used transparent Frameticks to be sure everything is aligned.

$\endgroup$
  • 1
    $\begingroup$ It took me a considerable amount of time in order to realize that it was the use of uniform ticks on all plots (with Transparency set on those that were not shown) that enables you to make the uniformly spaced output. I think you should spell that out in your answer. $\endgroup$ – Jack LaVigne Oct 16 '15 at 23:33

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.