Create a list of plots of sin(xt), where x goes from 0 to 10 and t goes from 1 to 6
Here is one way:
table = ConstantArray["", {12, 8}];
table[[3 ;;, 3 ;;]] = Table[N@Sin[x t], {x, 10}, {t, 6}];
table[[1, 3 ;;]] = Range[6];
table[[1, 2]] = "t-values";
table[[2, 1]] = "x-values";
table[[3 ;;, 1]] = Range[10];
Grid[
table,
Alignment -> Left,
Frame -> True,
Dividers -> All
]
(* create your values *)
rows = Range[10];
cols = Range[6];
vals = Outer[Sin@*Times, rows, cols];
(* make a table *)
tf = TableForm[N@vals, TableHeadings -> {rows, cols}];
(* label it *)
Labeled[tf, {"x-vals", "t-vals"}, {Left, Top}, RotateLabel -> True]
You may want to use NumberForm
for a nicer display of the values. E.g.,
vals = Map[NumberForm[#, {4, 3}] &, vals, {2}]
tf = TableForm[N@vals, TableHeadings -> {rows, cols},
TableAlignments -> Right];
The title of your question refers to "plots of sin(x t)." You could also add the literal plots as Tooltips
to the table headings. Using Alan's answer as a starting point.
(*create your values*)
rows = Range[10];
cols = Range[6];
vals = Outer[Sin@*Times, rows, cols];
(*make a table*)
tf = TableForm[N@vals,
TableHeadings -> {
Tooltip[#,
Show[
Plot[Sin[#*t], {t, 0, cols[[-1]]}],
DiscretePlot[Sin[#*t], {t, 1, cols[[-1]], 1},
PlotStyle -> Red],
AxesLabel ->
(Style[#, 12, Bold] & /@ {"t", "Sin[x t]"}),
PlotLabel -> StringForm["x = ``", #]]] & /@ rows,
Tooltip[#,
Show[
Plot[Sin[x*#], {x, 0, rows[[-1]]}],
DiscretePlot[Sin[x*#], {x, 1, rows[[-1]], 1},
PlotStyle -> Red],
AxesLabel ->
(Style[#, 12, Bold] & /@ {"x", "Sin[x t]"}),
PlotLabel -> StringForm["t = ``", #]]] & /@ cols}];
(*label it*)
Labeled[tf, {"x-vals", "t-vals"}, {Left, Top},
RotateLabel -> True]