I'd like to be able to generate an 11 x 8.5 "scorecard" for various data projects I am working on. Traditionally, I'd import all my data into Excel, put the data into worksheets, and then have a worksheet for this scorecard which would contain headers, tables, and graphics. I'd then print to PDF this worksheet.

Ideally it would have two or three columns of data, for different lines of business for instance. Again this would be pretty easy in Excel because I could just manually align them.

Here's an ASCII art of what I have in mind:

| scorecard                           |
|           |            |            |
| table     | table      |  chart     |
| 1 2 3     | 1 2 5      |  xxxxx     |  8.5 in
| x y z     | x a b      |  xxxxx     |
|           |            |            |
| chart     |            |            |
| +++++++   |            |            |
| +++++++   |            |            |
|           |            |            |
               11 inches

I'd like to move this process to Mathematica for many reasons, but haven't found a great way to combine all these things. I've tried something like the below code, which makes some charts and puts them into a Grid and exports that grid.


However, the PDF it generates is not a full page and it includes the Grid[] code in there. I feel like Mathematica probably has some easy way to generate this using a combination of Grid, Column, Row, GraphicsGrid, or Show but I haven't been able to figure out the magic sauce. Please help point me in the right direction!


You need to set the size of the elements of the scorecard. Have a look at Histogram's ImageSize option. Also you can set your tables in Grid or TableForm wrapped in a Pane or Panel to get them the size you want as well. They have ImageSize options as well.

To help with the ImageSize parameters make use of UnitConvert to convert from your know dimensions in "Inches" to the printer dimensions of "DesktopPublishingPoints".

QuantityMagnitude@UnitConvert[Quantity[3, "Inches"], "DesktopPublishingPoints"]

It is a bit long so setup a function for it

inchesToPrinterPoints[x_ /; x >= 0] := 
 QuantityMagnitude@UnitConvert[Quantity[x, "Inches"], "DesktopPublishingPoints"]

Now you can use inchesToPrinterPoints in the ImageSize option parameters.

Hope this helps.

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.