Files
@ c039c549918d
Branch filter:
Location: AENC/switchchain/cpp/showgraphs.m - annotation
c039c549918d
907 B
application/vnd.wolfram.mathematica.package
Add start of triangle counting for powerlaws
a79267af1717 a79267af1717 c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d a79267af1717 a79267af1717 a79267af1717 f8cbbd135cc1 f8cbbd135cc1 f8cbbd135cc1 f8cbbd135cc1 f8cbbd135cc1 a79267af1717 a79267af1717 a79267af1717 c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d c039c549918d | (* ::Package:: *)
Needs["ErrorBarPlots`"]
(* ::Section:: *)
(*Visualize graphs*)
gsraw=Import[NotebookDirectory[]<>"graphdata.m"];
ListPlot[gsraw[[2]],Joined->True,PlotRange->All,AxesLabel->{"Step","Triangles"}]
gs=Map[Graph[#,GraphLayout->"CircularEmbedding"]&,gsraw[[1]]];
gs2=Map[Graph[#,GraphLayout->Automatic]&,gsraw[[1]]];
Grid[Partition[gs,10],Frame->All]
(* ::Section:: *)
(*Plot triangle counts*)
gsraw=Import[NotebookDirectory[]<>"graphdata.m"];
Map[ListPlot[#[[2]],Joined->True,PlotRange->All]&,gsraw[[1;;3]]]
averages=Map[{#[[1]],Mean[#[[2,-1000;;-1]]]}&,gsraw];
averagesGrouped=GatherBy[averages,#[[1]]&];
averagesErrorBars=Map[
{{#[[1,1]],Mean[#[[All,2]]]},
ErrorBar[StandardDeviation[#[[All,2]]]/Sqrt[Length[#]]]
}&,averagesGrouped];
ErrorListPlot[averagesErrorBars,Joined->True,PlotMarkers->Automatic,AxesLabel->{"n","\[LeftAngleBracket]triangles\[RightAngleBracket]"}]
|