Changeset - 39d31ff390d2
[Not reviewed]
0 0 1
Tom Bannink - 8 years ago 2017-09-18 10:21:41
tom.bannink@cwi.nl
Add mathematica notebook to plot montecarlo data
1 file changed with 30 insertions and 0 deletions:
0 comments (0 inline, 0 general)
montecarlo/plots.m
Show inline comments
 
new file 100644
 
(* ::Package:: *)
 

	
 
(* ::Section:: *)
 
(*P(Z^n | start 011..11) on the chain {1,...,n}*)
 

	
 

	
 
rawdata=Import[NotebookDirectory[]<>"data/data_reach_chain_end.m"];
 
data=GatherBy[rawdata,{#[[2]]}&];
 
(* data[[n index, prob index, p / n / prob / runs within timelimit / total runs]] *)
 
nlabels=Map["n = "<>ToString[#[[1,2]]]&,data];
 

	
 

	
 
plotZoomed=ListPlot[data[[All,All,{1,3}]],
 
Joined->True,
 
PlotMarkers->Automatic,
 
PlotRange->{{0.6,0.7},{0,0.5}},
 
Frame->True,
 
ImageSize->250,
 
Epilog->{Dashed,Line[{{1-1/E,0},{1-1/E,1}}]}
 
];
 

	
 
plotBoth=ListPlot[data[[All,All,{1,3}]],
 
Joined->True,
 
FrameLabel->{"p (probability of BAD)","P(\!\(\*SuperscriptBox[\(Z\), \(n\)]\) | start 011..11)"},
 
PlotMarkers->Automatic,
 
PlotLegends->nlabels,
 
PlotRange->{{0,1},{0,1}},
 
Frame->True,
 
ImageSize->500,
 
Epilog->Inset[plotZoomed,Scaled[{0.32,0.6}]]]
0 comments (0 inline, 0 general)