MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Grids

  • To: mathgroup at
  • Subject: [mg131359] Re: Grids
  • From: Alexei Boulbitch <Alexei.Boulbitch at>
  • Date: Mon, 1 Jul 2013 05:48:58 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

I am trying to get the x1 and y1 results of a basic function displayed in two columns with a grid around each x1 and y1 entry.
However, my result only appears with a grid around the exterior of the x1 and y1 values, and the only the column headings.
There is a vertical divider between the x1 and y1 columns, but the row dividers are missing.

What is the syntax to get the row dividers to appear?

Thanks in advance, and below is what I have tried so far:

x1 = Range[-3, 3](*Define the range of x1 values.*)

g[x1_] := x1^2(*Define the function*)

y1 = g[x1](*Calculate the y values of the function*)

Out[21]= {9, 4, 1, 0, 1, 4, 9}
Grid[{{xVal, yVal}, {Column[x1], Column[y1]}}, Frame -> All](*The result of this function in columar format*)

I also tried the the below statement as well but it gives the same result.

Grid[{{xVal, yVal}, {Column[x1], Column[y1]}}, Frame -> All, Dividers -> All]


Hi, Mark,

Here are your definitions:

x1 = Range[-3, 3];
g[x1_]:=x1^2(*Define the function*);

Here is a horizontally-oriented grid, Try it:

Grid[{x1, y1}, Dividers -> All]

This is the vertically-oriented grid. I think it is the one you want to make.

Grid[Transpose[{x1, y1}], Dividers -> All]

Try it.

Here is another one with a bit of styling. Try this:

Grid[Transpose[{x1, y1}], Dividers -> All, FrameStyle -> Thick,
 Background -> {None, {{LightBlue, LightOrange}}}]

Play with colors.

Have fun, Alexei

Alexei BOULBITCH, Dr., habil.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566
Office fax:       +352-2454-3566
mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch at

  • Prev by Date: Constraint definition is not valid: WHY?
  • Next by Date: Re: Finding a function within an arbitrary expression
  • Previous by thread: Re: Grids
  • Next by thread: Re: Grids