用Mathematica给图片添加文字(02)

 时间:2024-10-11 21:15:42

由于百度经验过长会影响阅读,所以,把用Mathematica给图片添加文字分开来写。这是第二篇。

工具/原料

电脑

Mathematica

具体案例:

1、 用Labeled给圆加标注——“单位圆”:Labeled[Graphics[Circle[], Text[单位圆]] 注意,这里添加的文字是文本形式,不属于图片的一部分。

用Mathematica给图片添加文字(02)

3、 绘制多条函数曲线,并用Inset添加标签:legendPlot[xl_List, d_, args___] := Plot[xl, 颊俄岿髭d, Epilog -> Inset[Panel[ Grid[MapIndexed[{Graphics[{ColorData[1, First@#2], Thick, Line[{{0, 0}, {1, 0}}]}, AspectRatio -> .1, ImageSize -> 20], #1} &, xl]]], Offset[{-2, -2}, Scaled[{1, 1}]], {Right, Top}], args];legendPlot[{Sin[x], Cos[x], Sinc[x]}, {x, 0, 10}]

用Mathematica给图片添加文字(02)用Mathematica给图片添加文字(02)

5、 不明白为什么下面这个代码无法显示标签:Table[BarChart[{1, 2, 3}, ChartLabels -> Placed[{"a", "b", "c"}, p], PlotLabel -> p], {p, {"标签在底端", "标签居中", "标签居顶"}}]

用Mathematica给图片添加文字(02)用Mathematica给图片添加文字(02)

7、 给条形统计图外部添加标签:Table[PieChart[{1, 2, 3}, ChartLabels -> Placed[{"a", "b", "c"}, p], SectorOrigin -> {Automatic, 1}, PlotLabel -> p], {p, {"RadialInside", "RadialEdge", "RadialOutside"}}]

用Mathematica给图片添加文字(02)
  • MATLAB如何在生成的图上添加到其他图像
  • 怎么用Mathematica制作动态图片
  • 如何用Mathematica扩展图片背景/增加纯色边框?
  • Mathematica 特殊字符输入(希腊字母/运算符)
  • 如何用Mathematica画三维散点图、等高线图等
  • 热门搜索
    普吉岛旅游注意事项 旅游区规划 澳大利亚 旅游签证 合阳旅游 云南旅游信息 青岛春节旅游攻略 枫泾旅游 旅游年票官网 张家界旅游包团 保定市旅游局