EdgeRenderingFunction
是 GraphPlot 和相关函数的一个选项,给出一个函数用以生成图形基元以绘制各条边.
EdgeRenderingFunction
EdgeRenderingFunction
是 GraphPlot 和相关函数的一个选项,给出一个函数用以生成图形基元以绘制各条边.
更多信息
- EdgeRenderingFunction->g 指定应该用 g[{ri,…,rj},{vi,vj},lblij] 给出的图形基元修饰各边,其中 ri、rj 为该边的开始和结束点,vi、vj 为该边的开始和结束的顶点,lblij 是为边指定的任意标签.
- 通过应用 EdgeRenderingFunction 获得的图形基元实际上直接拼成了图形,该图形由类似 GraphPlot 的函数产生. Inset 可以用于插入任意表达式.
- EdgeRenderingFunction->Automatic 按照由 DirectedEdges 和 EdgeLabeling 指定的样式绘制各边.
- PlotStyle 的设置定义的默认值可以被明确的 EdgeRenderingFunction 的指令所屏蔽.
范例
打开所有单元 关闭所有单元基本范例 (3)
LayeredGraphPlot[{1 -> 5, 2 -> 4, 3 -> 4, 3 -> 5, 4 -> 5}, EdgeRenderingFunction -> ({Red, Arrow[#1, 0.1]}&)]GraphPlot3D[{2 -> 3, 2 -> 4, 2 -> 5, 3 -> 4, 3 -> 5, 4 -> 5}, EdgeRenderingFunction -> (Cylinder[#1, 0.05]&), VertexRenderingFunction -> (Sphere[#, 0.1]&)]GraphPlot3D[Table[1, {100}, {100}], EdgeRenderingFunction -> None, VertexRenderingFunction -> (Sphere[#, 0.05]&)]范围 (2)
GraphPlot[{4 -> 1, 5 -> 1, 3 -> 2, 2 -> 5, 3 -> 4, 3 -> 5, 5 -> 4}, EdgeRenderingFunction -> ({Arrow[#], Inset["Mathematica", Mean[#1], Automatic, Automatic, #[[1]] - #[[2]], Background -> White]}&)]arrow = [image];GraphPlot[{2 -> 1, 3 -> 1, 4 -> 1, 5 -> 1, 6 -> 1}, EdgeRenderingFunction -> ({Line[#], Inset[arrow, Mean[#1], Automatic, Automatic, #[[2]] - #[[1]], Background -> White]}&)]文本
Wolfram Research (2007),EdgeRenderingFunction,Wolfram 语言函数,https://reference.wolfram.com/language/ref/EdgeRenderingFunction.html.
CMS
Wolfram 语言. 2007. "EdgeRenderingFunction." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/EdgeRenderingFunction.html.
APA
Wolfram 语言. (2007). EdgeRenderingFunction. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/EdgeRenderingFunction.html 年
BibTeX
@misc{reference.wolfram_2026_edgerenderingfunction, author="Wolfram Research", title="{EdgeRenderingFunction}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/EdgeRenderingFunction.html}", note=[Accessed: 11-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_edgerenderingfunction, organization={Wolfram Research}, title={EdgeRenderingFunction}, year={2007}, url={https://reference.wolfram.com/language/ref/EdgeRenderingFunction.html}, note=[Accessed: 11-August-2026]}