(rates)
| 144 | fig.savefig(str(rate) + '_graph.pdf', format='pdf', bbox_inches='tight') |
| 145 | |
| 146 | def plot_all(rates): |
| 147 | rate_colors = {1: 'tab:blue', 2: 'tab:green', 3: 'tab:orange', 4: 'tab:red'} |
| 148 | xs = prover_data['starting_degree'].unique() |
| 149 | xs.sort() |
| 150 | |
| 151 | # Proving time |
| 152 | fig, ax = plt.subplots(figsize=set_size()) |
| 153 | ax.set_title('Prover time') |
| 154 | for r in rates: |
| 155 | color = rate_colors[r] |
| 156 | pdata = prover_data[prover_data['starting_rate'] == r] |
| 157 | ax.plot('starting_degree', 'stir_prover_time', data=pdata, linestyle=linestyle, marker=stir_marker, color=color) |
| 158 | ax.plot('starting_degree', 'fri_prover_time', data=pdata, linestyle=linestyle, marker=fri_marker, color=color) |
| 159 | ax.grid() |
| 160 | ax.set_xscale('log', base=2) |
| 161 | ax.set_yscale('log', base=2) |
| 162 | ax.set_ylabel('Time (s)') |
| 163 | ax.set_xticks(ticks=xs, labels=["$2^{{{}}}$".format(str(int(log2(x)))) for x in xs]) |
| 164 | plt.tight_layout() |
| 165 | # Save and remove excess whitespace |
| 166 | fig.savefig('provertime_graph.pdf', format='pdf', bbox_inches='tight') |
| 167 | |
| 168 | |
| 169 | # Verifier time |
| 170 | fig, ax = plt.subplots(figsize=set_size()) |
| 171 | ax.set_title('Verifier time') |
| 172 | for r in rates: |
| 173 | color = rate_colors[r] |
| 174 | vdata = verifier_data[prover_data['starting_rate'] == r] |
| 175 | ax.plot('starting_degree', 'stir_verifier_time', data=vdata, linestyle=linestyle, marker=stir_marker, color=color) |
| 176 | ax.plot('starting_degree', 'fri_verifier_time', data=vdata, linestyle=linestyle, marker=fri_marker, color=color) |
| 177 | ax.grid() |
| 178 | ax.set_xscale('log', base=2) |
| 179 | ax.set_ylabel('Time (ms)') |
| 180 | ax.set_xticks(ticks=xs, labels=["$2^{{{}}}$".format(str(int(log2(x)))) for x in xs]) |
| 181 | plt.tight_layout() |
| 182 | # Save and remove excess whitespace |
| 183 | fig.savefig('verifiertime_graph.pdf', format='pdf', bbox_inches='tight') |
| 184 | |
| 185 | |
| 186 | # Argument size |
| 187 | fig, ax = plt.subplots(figsize=set_size()) |
| 188 | ax.set_title('Argument size') |
| 189 | for r in rates: |
| 190 | color = rate_colors[r] |
| 191 | pdata = prover_data[prover_data['starting_rate'] == r] |
| 192 | ax.plot('starting_degree', 'stir_argument_size', data=pdata, linestyle=linestyle, marker=stir_marker, color=color) |
| 193 | ax.plot('starting_degree', 'fri_argument_size', data=pdata, linestyle=linestyle, marker=fri_marker, color=color) |
| 194 | ax.grid() |
| 195 | ax.set_xscale('log', base=2) |
| 196 | ax.set_ylabel('Size (KiB)') |
| 197 | ax.set_xticks(ticks=xs, labels=["$2^{{{}}}$".format(str(int(log2(x)))) for x in xs]) |
| 198 | plt.tight_layout() |
| 199 | # Save and remove excess whitespace |
| 200 | fig.savefig('argumentsize_graph.pdf', format='pdf', bbox_inches='tight') |
| 201 | |
| 202 | # Verifier hashes |
| 203 | fig, ax = plt.subplots(figsize=set_size()) |
no test coverage detected