Wolfram 可视化 | 应用示例

在代码中点击并按下
+
,即可编辑并运行任何代码。
科学、数据与函数可视化。Wolfram 可视化功能简化并自动化图表创建过程,帮助用户理解数据和函数,适用于从个人探索到报告撰写和学术论文发表等各种场景。

可视化数据探索

使用数十种可用图表类型可视化数据趋势:
Run
ListPlot
Group of 8
COUNTRIES
[{"Population","GDP"}]
Group of 8
COUNTRIES
["Name"],​​ScalingFunctions{"Log","Log"}
Out[]=
轻松使用饼图可视化比例关系:
Run
PieChart
Group of 8
COUNTRIES
["Population"],ChartLabels->
Group of 8
COUNTRIES
["Name"]
轻松使用柱状图比较不同类别的数据:
Run
BarChart
Group of 8
COUNTRIES
["Population"],ChartLabels->
Group of 8
COUNTRIES
["CountryCode"]
在多层组织结构中标记和可视化数据:
Run
BarChart​​
Group of 8
COUNTRIES

population
Year: 2005
,
population
Year: 2020
,​​ChartLabels->
Group of 8
COUNTRIES
["CountryCode"],None,​​ChartLegends->{"2005","2020"}​​

设置绘图样式

定义并绘制一组函数:
Run
functions=Table[BesselJ[n,x],{n,4}];​​Plot[Evaluate[functions],{x,0,10}]
使用
PlotTheme
从精选的自动选项中快速设置绘图样式:
Run
Plot[Evaluate[functions],{x,0,10},PlotTheme->"Detailed"]
创建显示不同主题的列表以便于比较:
Run
Table[​​Plot[Evaluate[functions],{x,0,10},PlotTheme->theme,PlotLabel->theme],​​{theme,{"Minimal","Marketing","Monochrome"}}​​]
单独设置选项或将选项与整体主题相结合:
Run
Plot[Evaluate[functions],{x,0,10},PlotTheme->"Marketing",PlotLegends->"Expressions"]

图表标注

使用
Entity
框架轻松获取可用的人口、人均 GDP 和名称数据:
Run
countrydata=
all countries, dependencies, and territories
COUNTRIES

population
,
GDP
per capita
;​​countrynames=
all countries, dependencies, and territories
COUNTRIES
["Name"];
可视化检索到的数据:
Run
ListLogLogPlot[countrydata]
使用元数据自动标注每个数据点(不适合的标签会自动生成为工具提示):
Run
ListLogLogPlot[countrydata->countrynames]
包含框架标签和总标题以完善可视化效果:
Run
ListLogLogPlot[countrydata->countrynames,​​Frame->True,​​PlotLabel->"Per capita GDP vs. Population for all Countries",​​FrameLabel->{"People","USD per person per year"}​​]

函数绘图

在指定域内绘制单变量函数:
Run
Plot[Tan[x],{x,-3Pi/2,3Pi/2}]
在指定参数范围内绘制参数函数:
Run
ParametricPlot[{Cos[Pit]*GoldenRatio^t,Sin[Pit]*GoldenRatio^t},{t,0,6}]
使用三维版本的绘图函数:
Run
ParametricPlot3D{Cos[πt](
t
GoldenRatio
+Cos[v]),(
t
GoldenRatio
+Cos[v])Sin[πt],4t-Sin[v]},{t,0,5},{v,0,2Pi},
Options settings

使用选项制作样式化的三维函数图:
Run
Plot3DTan
2
x
+
2
y
,{x,y}∈Disk[{0,0},10,{Pi/2,3Pi/2}],
Options settings


创建交互式可视化

轻松创建交互式显示:
Run
Manipulate​​ParametricPlot3D
Parametric surface
,​​{t,0,tmax},{v,0,vmax},
Options settings
,​​{{vmax,2Pi,"Maximum v parameter"},Pi/2,2Pi},{{tmax,3,"Maximum t parameter"},1,5},ControlPlacement->Top,SaveDefinitions->True,TrackedSymbols:>{vmax,tmax}
Out[]=
​
Maximum v parameter
Maximum t parameter

矢量场可视化

可视化偶极子的电场线:
Run
In[]:=
StreamPlot3D
{x,y,z-1}
3
Norm[{x,y,z-1}]
-
{x,y,z+1}
3
Norm[{x,y,z+1}]
,{x,-3,3},{y,-3,3},{z,-3,3}

复数函数绘图

体积数据可视化

创建地理图形