Skip to content

Commit 8e55f44

Browse files
committed
fix key issue
1 parent c3d6623 commit 8e55f44

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

NK.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@
452452
"metadata": {},
453453
"outputs": [],
454454
"source": [
455-
"def run_experiment(N=5, K=3, C=0.0, p_jump=0):\n",
455+
"def run_experiment(N=5, K=3, C=0, p_jump=0):\n",
456456
" \n",
457457
" result = {\n",
458458
" \"name\": generate_title(N, K, C, p_jump),\n",
@@ -498,8 +498,8 @@
498498
"source": [
499499
"Ns = [4,6]\n",
500500
"Ks = [0,2,3,4]\n",
501-
"Cs = [0,0.1,0.25,0.5,0.75,1]\n",
502-
"p_jumps = [0.0,0.25,0.5,0.75,1]\n",
501+
"Cs = [0,0.25,0.5,0.75,1]\n",
502+
"p_jumps = [0,0.25,0.5,0.75,1]\n",
503503
"results = []"
504504
]
505505
},

chartjs.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

index.html

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,28 @@
2323
line-height: 20px;
2424
}
2525

26+
#controls div {
27+
width: 25%;
28+
min-width: 250px;
29+
float: left;
30+
}
31+
32+
#controls button {
33+
display: block;
34+
clear: both;
35+
background: none;
36+
border: 1px solid #ccc;
37+
margin: 10px 0;
38+
padding: 5px 15px;
39+
}
40+
2641
#chart {
2742
}
2843
</style>
2944
</head>
3045
<body>
3146
<h1>NK-Grahps</h1>
3247
<p>This is an interactive chart to explore the results for our different input variables</p>
33-
<div id="chart">
34-
<canvas id="myChart"></canvas>
35-
</div>
3648

3749
<div id="controls">
3850
<div>
@@ -58,6 +70,12 @@ <h1>NK-Grahps</h1>
5870
<button onclick="reset()">Reset</button>
5971
</div>
6072

73+
<div id="chart">
74+
<canvas id="myChart"></canvas>
75+
</div>
76+
77+
78+
6179
<div id="navigation"></div>
6280

6381
<script>
@@ -156,7 +174,12 @@ <h1>NK-Grahps</h1>
156174

157175
function addNewWithControls() {
158176
console.log('controls')
159-
let key = `N = ${newEntry['N']}, K = ${newEntry['K']}, C = ${newEntry['C']}, p_jump = ${newEntry['p_jump']}`
177+
let N = newEntry['N'];
178+
let K = newEntry['K'];
179+
let C = newEntry['C'];
180+
let p_jump = newEntry['p_jump'];
181+
182+
let key = `N = ${N}, K = ${K}, C = ${C}, p_jump = ${p_jump}`
160183
console.log(key)
161184
if (store[key]) {
162185
if (active[key]) {

0 commit comments

Comments
 (0)