MathGroup Archive 2002

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

Search the Archive

Re: Re: Table as Graphics Object?

  • To: mathgroup at
  • Subject: [mg35080] Re: [mg35068] Re: [mg35027] Table as Graphics Object?
  • From: Dale Horton <daleh at>
  • Date: Mon, 24 Jun 2002 03:21:09 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

There are much easier ways to create a bitmap from a Cell. You don't need 
to use menu commands. All you need are Import and Export.

ls = Table[Random[Integer, {1, 6}], {5}, {5}];

myGraphic = ListPlot3D[ls, DisplayFunction -> Identity];

Create a Cell expression for the Table (like you'd see with Format>Show 
Expression), then round trip it through a bitmap format. For example, "GIF".

     ExportString[Cell[BoxData@ToBoxes@TableForm@ls, "Output"], "GIF"],"GIF"]


Since myTable is a Raster graphic, it does not scale well. However, if you 
use a scalable format (such as EPS) then the text will not become 
distorted. Resizing will change the space in the table, but not the size of 
the elements. (Sorry, that's the way PostScript works.) To change the size 
of the elements, use a StyleBox to set the FontSize.

myTable =
       Cell[BoxData@StyleBox[ToBoxes@TableForm@ls, FontSize -> 16], "Output"],
       "EPS"], "EPS"]


At 10:56 PM 6/20/2002, Andrzej Kozlowski wrote:

>Perhaps it may be useful to make a quick summary of the three approaches
>I proposed in answer to this question. The first method creates a bitmap
>representation of the table of numbers or symbols, and while it does
>scale, it looses quality, as bitmaps do. The second approach produces a
>graphic representation of a table that can be scaled to an arbitrary
>size and whose font can be changed by setting $DefaultFont to any chosen
>font or size. However this method is less flexible: for example I think
>one can't create matrix brackets using it. Finally, the last approach
>produces a fixed size, fixed font graphic representation of a table.

  • Prev by Date: Re: vector integration
  • Next by Date: Re: Re: Solve weirdness again
  • Previous by thread: Re: Table as Graphics Object?
  • Next by thread: Varying color in ParametricPlot