I'm a mathematica newbie!
I want to display 15 plots (5 rows labeled by "A" "B" "C" "D" "E" and 3 columns labeled by "P1" "P2" "P3"). The plots in the first two columns are regular (2D) Plot, whereas the plots in the 3rd column are actually 3DPlot.
For a first try I just focused on plotting the 10 2D plots. Even with that I don't get the table rows and columns names displayed properly (although the graphs seem correct):
rowHeadings = TextCell[ StringJoin[{"Row ",{"A","B","C","D","A"}[[#]]}],FontSize -> s] & /@Range[1,5];
colHeadings =TextCell[{ "P1 ","P2 "}];
Clear[format];
format[plots_, s_: 10] := TableForm[plots,
TableHeadings -> {rowHeadings,colHeadings},
TableAlignments -> Center, TableSpacing -> {1, 1}]
parameters = Table[{rowID, colID},{rowID, 1, 5}, {colID, {1,2}}];
myfunc[colID,rowID,x_] :=myfunc[colID,values[[colID]],rowID,x];
myfunc[colID,rowID] := myfunc[colID,rowID,#]&;
functors = Map[myfunc[#[[2]],#[[1]] ]&,parameters,{2}];
Labeled[format[
Map[Plot[#[x],{x,0,1},
AspectRatio -> 1,
FrameTicks->Automatic,
ImageSize -> 100]&,functors, {2}]],
Style["Reward function for deviation from initial trait value", 16],Top]
The plots are displayed properly but the Table labels are not shown. Would anyone see why? And next how am I supposed to add the 3rd column with a 3DPlot in this kind of setting? Is it even possible with Mathematica?
{"P1","P2"}aTextCell. TrycolHeadings=TextCell/@{"P1","P2"}. Just a heads up, you probably shouldn't usesthe way you do inrowHeadingsfor font size, it seems to work but I'm not sure why. You're leavingsas a global variable, whileformatshould be localizing it. Better to dorowHeadings[s_:10]:=TextCell[...,FontSize->s]then call it withTableHeadings->{rowHeadings[s]}. Also,valuesinmyfuncseems to be undefined. – N.J.Evans Aug 30 '22 at 19:07