此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.1)
Mathematica HowTo
How to | Format a Table of Data
Not only can Mathematica perform very complicated data analysis, it can also display these results in a formatted, easy-to-read display that can be used in other documents or presentations. One of the most useful ways to format data is with a table.
First, import some data to work with:
In[1]:=
Click for copyable input
Out[1]=
Put all this information in a table:
In[2]:=
Click for copyable input
Out[2]=
Left-align the text and put extra space between the columns and rows:
In[3]:=
Click for copyable input
Out[3]=
Add a frame and use "Text" as the style for each item:
In[4]:=
Click for copyable input
Out[4]=
Emphasize the row and column headings with different backgrounds:
In[5]:=
Click for copyable input
Out[5]=
Any expression can appear as part of a table of data, including graphics:
In[6]:=
Click for copyable input
Out[6]=
Individual items can be made to span multiple rows, columns or both by using SpanFromLeft or SpanFromBoth:
In[7]:=
Click for copyable input
Out[7]=