diff --git a/triangle_creation_frequency_plots.m b/triangle_creation_frequency_plots.m index 581469c7f211d890807af1dc15ac755376ca7919..33faa20593f5ca3b6421202a3ce17d06ac7f7ef7 100644 --- a/triangle_creation_frequency_plots.m +++ b/triangle_creation_frequency_plots.m @@ -77,3 +77,28 @@ hcol=GraphicsGrid[Transpose[{{h1,h2,h3},{h1zoomed,h2zoomed,h3zoomed}}]] Export[NotebookDirectory[]<>"plots/triangle_creation_frequencies_log.pdf",hcol] + + +(* ::Subsection:: *) +(*Test with 'Callout' labels*) + + +createCalloutPlot[data_]:=Module[{h,hl,bcdata,llp}, +h=Histogram[data,{-20.5,20.5,1},{"Log","Probability"},PlotRange->All,ImageSize->280]; +hl=HistogramList[data,{-20.5,20.5,1},"Probability"]; +bcdata=Map[If[#>=0.01,Callout[#,NumberForm[#,{2,3}]],Clip[#,{10^-5,2}]]&,hl[[2]]]; +llp=ListLogPlot[bcdata,PlotStyle->None,DataRange->{-20,20}]; +Show[h,llp] +] +histograms3=Map[createCalloutPlot[Flatten[#]]&,differences,{2}]; + + +(* TODO: Somehow the values of these histograms do not match the ones above!!! ????? *) + + +Show[histograms3[[2]],PlotLabel->"n=1000, \[Tau]=2.2"] +Show[histograms3[[5]],PlotLabel->"n=1000, \[Tau]=2.5"] +Show[histograms3[[8]],PlotLabel->"n=1000, \[Tau]=2.8"] + + +