7
$\begingroup$

I would like to create the following dashboard:

DashboardDesign

The numbers indicate my desired dimensions for the cells. I would like the cells to contain a regional plot, a trend line, and bar charts. I have tried to map the design with GraphicsRow, GraphicsColumn, and GraphicsGrid. Thus far the best I've been able to do is:

g1 = Graphics[Rectangle[{0, 0}, {2, 2}]];
g2 = Graphics[Rectangle[{0, 0}, {2, 2}]];
g3 = Graphics[Rectangle[{0, 0}, {1, 4}]];
gg1 = GraphicsGrid[{{GraphicsGrid[{{g1}, {g2}}, Frame -> All], g3}}, 
  Frame -> All]

Which produces:

Trail1

and

g6 = Graphics[Rectangle[{0, 0}, {1, 1}]];
g3 = Graphics[Rectangle[{0, 0}, {1, 4}]];
g7 = Graphics[Rectangle[{0, 0}, {1, 5}]];
GraphicsRow[{GraphicsColumn[{g6, g3}, Frame -> All], g7}] 

which gave:

trial2

I've thought about using Inset, but I'm not sure that will work? What else can I try? Is Mathematica really what I want to use? I've helped in designing a dashboard in R, and it seemed quite painful.

$\endgroup$
2
  • $\begingroup$ Re: " Is Mathematica really what I want to use?" is a very difficult question to answer ... for me :) $\endgroup$ Commented Nov 24, 2015 at 5:41
  • $\begingroup$ Yes, sorry about that. I should have asked: What other programs could produce this? In fact, I prefer to use Mathematica. Thanks for the solution. $\endgroup$
    – tau1777
    Commented Nov 24, 2015 at 14:06

2 Answers 2

8
$\begingroup$
x = Graphics[Circle[]];
{spa, spl, spb} = {SpanFromAbove, SpanFromLeft, SpanFromBoth};
GraphicsGrid[{
  {x,   x,   x,   x  },
  {x,   spl, x,   spa}, 
  {spa, spb, spa, spa}, 
  {x,   spl, spa, spa}, 
  {spa, spb, spa, spa}
  }, Frame -> All]

Mathematica graphics

$\endgroup$
5
  • 1
    $\begingroup$ Have you tried it with Graphics like rectangles that have the correct size? i.sstatic.net/GnBhR.png (In case you like the code: Import["http://goo.gl/NaH6rM"]["https://i.sstatic.net/fPqOg.png"]) $\endgroup$
    – halirutan
    Commented Nov 24, 2015 at 5:42
  • $\begingroup$ @halirutan Looks like the OP will try to put different kinds of objects inside the grid. I don't believe that trying to adjust the whole thing to rectangles right now is going to relief his final tuning. $\endgroup$ Commented Nov 24, 2015 at 5:45
  • $\begingroup$ @halirutan In any case, please try your code with Alignment -> Top $\endgroup$ Commented Nov 24, 2015 at 5:52
  • 4
    $\begingroup$ OK, this is typical for WRI. Why should alignment be important for items that fit perfectly? sign $\endgroup$
    – halirutan
    Commented Nov 24, 2015 at 5:54
  • $\begingroup$ I'm selecting this as the answer since it was the exactly what I needed. $\endgroup$
    – tau1777
    Commented Nov 24, 2015 at 19:16
7
$\begingroup$

You can use the tools in the menu to build whatever shape you need:

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks, I like the generality of this approach. I would say that it was a bit tricky to follow the video mostly because my right-click option did not work the same as on the video. For others in my situation you can go to the Insert option next to the right of File and Edit, and then click on Table/Matrix. First I made the table and then going back to that Table/Matrix I was able to select "Make Spanning". $\endgroup$
    – tau1777
    Commented Nov 24, 2015 at 19:16

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.