I always wonder how many inbuilt functions does Mathematica have (of course you can google for it) and how they are connected with each other! So I tried this (v10.1).
SetDirectory[$InstallationDirectory<>"/Documentation/English/System/ReferencePages/Symbols"]
comms = FileNames[];
ncomms = Length[comms]
4613
I believe this is the total number of documented functions. Now the second part where I am stuck in. How to find the connections among them?
What I am thinking is to get the list of functions from the See Also
section of an example. Here I do one manually. Let's say I start with Plot
. See Also
in Plot.nb
contains ({DiscretePlot, ListLinePlot, ParametricPlot, PolarPlot, Plot3D, ContourPlot, Graphics, Show}). So I store them.
link["Plot"] = {"DiscretePlot", "ListLinePlot", "ParametricPlot" ,
"PolarPlot", "Plot3D", "ContourPlot", "Graphics", "Show"};
Now I want to scan each element of the list. For example, I take Plot3D
and Graphics
link["Plot3D"] = {"ListPlot3D", "ContourPlot", "DensityPlot", "ParametricPlot3D",
"Graphics3D", "ListSurfacePlot3D", "Plot", "Show"};
link["Graphics"] = {"Plot", "ListPlot", "ListLinePlot", "ParametricPlot", "DensityPlot",
"ArrayPlot", "RegionPlot", "ContourPlot", "Show", "Graphics3D",
"Image", "Import", "Sound"};
Now combine and map them
map = Join[DirectedEdge[num["Plot"], num[#]] & /@ link["Plot"],
DirectedEdge[num["Plot3D"], num[#]] & /@ link["Plot3D"],
DirectedEdge[num["Graphics"], num[#]] & /@ link["Graphics"]];
Graph[map, VertexLabels -> Table[n -> sets[[n]], {n, nsets}], ImagePadding -> 10]
How can I put this whole thing in a Mathematica code?
WolframLanguageData["Plot", "RelationshipCommunityGraph"]
$\endgroup$WolframLanguageData
. I like Leonid's answer because it will work for the older version as well. $\endgroup$