13
$\begingroup$

I'm trying to draw a Grid of characters where some of the characters have Frame lines on 3 sides. For example:

  +   +
x | x | x
  +---+ 
x   x   x

x   x   x

That's something like a Grid[item = Table[x,{3},{3}]], except with item[[1,2]] = Item[x,FrameStyle->{{White,Black},{Black,Black}}], except that produces a complete box around the x for me.

When the documentation says:

FrameStyle->{{left,right},{bottom,top}} specifies that different sides of a graphics frame should be drawn with different styles.

I fear that the "...of a graphics frame..." part means that this will work for a Plot, but not for a Grid.

Is there a way to style a frame such that I only draw three edges of it? It doesn't have to be pretty--I'm planning on generating the Grid from some data that I have lying around.

$\endgroup$
17
$\begingroup$

How about this?

Grid[{{1, 2, 3}, {4, Item[5, Frame -> {{True, True}, {True, False}}], 6}}]

frame

$\endgroup$
  • $\begingroup$ You beat me. :-) $\endgroup$ – Mr.Wizard Apr 17 '12 at 22:57
  • 3
    $\begingroup$ A very rare occurrence. $\endgroup$ – DavidC Apr 17 '12 at 22:58

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.