Putting Tables into Graphics (once again)
- To: mathgroup at smc.vnet.net
- Subject: [mg35936] Putting Tables into Graphics (once again)
- From: AES <siegman at stanford.edu>
- Date: Thu, 8 Aug 2002 06:06:27 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
The following was suggested to me some time back as a way of putting a
formatted and styled Table into a Graphics cell, and it works -- sort of
myTable = Table[ {"Some text", x, x^2, x^3, x64}, {x,1,5} ];
myTableGraphicOne = Graphics[ Text[ StyleForm[ TableForm[ myTable],
FontWeight->"Bold", FontSize->14], Scaled[{0, 1}], {-1, 1},
FormatType->TraditionalForm]];
myTableGraphicTwo = Graphics[ Text[ StyleForm[ TableForm[myTable],
FontWeight->"Bold", FontSize->14], Scaled[{1, 0}], {1, -1},
FormatType->TraditionalForm]];
Show[ myTableGraphicOne, myTableGraphicTwo,
ImageSize->{width*72, height*72}];
My assumption is that the Scaled[{1, 0}], {1, -1} options should have
the same meaning as they do in the elementary use of Text[] and thus in
this case should place the two copies of the Table in the upper left and
lower right corners of the overall graphic box; and that's sort of what
happens, at least for the width parameter, but not the height.
Try for example playing with the width and height in the ImageSize
option in the range of 4 to 8 (inches) each. As you increase the width
parameter the two Tables move apart, always staying attached to the left
and right sides of the ImageSize as expected.
If you increase the height parameter, however, the two Tables move up
and down a certain amount but for heights greater than about twice the
Table heights the vertical displacements seem to "clamp" and the Tables
no long follow or "stick to" the top and bottom of the graphics box.
What's going on here? Is the default value of AspectRatio having some
influence?