/articles/toma

To get this branch, use:
bzr branch http://darksoft.org/webbzr/articles/toma

« back to all changes in this revision

Viewing changes to figs/gen/bpbench.py

  • Committer: Suren A. Chilingaryan
  • Date: 2018-06-01 19:04:28 UTC
  • Revision ID: csa@suren.me-20180601190428-unnmuil13xpdlvf1
Revised 8-page version of short paper

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
import sys
4
4
import numpy as np
 
5
import matplotlib as mpl
5
6
import matplotlib.pyplot as plt
6
7
 
 
8
font = 14
 
9
mpl.rcParams.update({'font.size': font})
 
10
 
 
11
 
7
12
ops = 3526656000.
8
13
 
9
14
#colors=['blue', 'green', 'red']
20
25
base = load('../bench/bp_base1.txt', [0,1])
21
26
 
22
27
fig, (p) = plt.subplots(1, 1)
23
 
p_h = p.plot(hybrid[:,0], hybrid[:,1], '-o', label='hybrid, 2 slices', color=colors[1], markersize=3)
24
 
p_t = p.plot(tex[:,0], tex[:,1], '-o', label='tex-based, 2 slices', color=colors[2], markersize=3)
25
 
p_b = p.plot(tex[:,0], base[:,1], '-o', label='standard', color=colors[3], markersize=3)
 
28
 
 
29
if (font is not None) and (font > 12):
 
30
    p_h = p.plot(hybrid[:,0], hybrid[:,1], '-o', label='hybrid', color=colors[1], markersize=3)
 
31
    p_t = p.plot(tex[:,0], tex[:,1], '-o', label='tex-based', color=colors[2], markersize=3)
 
32
    p_b = p.plot(tex[:,0], base[:,1], '-o', label='standard', color=colors[3], markersize=3)
 
33
else:
 
34
    p_h = p.plot(hybrid[:,0], hybrid[:,1], '-o', label='hybrid, 2 slices', color=colors[1], markersize=3)
 
35
    p_t = p.plot(tex[:,0], tex[:,1], '-o', label='tex-based, 2 slices', color=colors[2], markersize=3)
 
36
    p_b = p.plot(tex[:,0], base[:,1], '-o', label='standard', color=colors[3], markersize=3)
26
37
 
27
38
ax = plt.gca()
28
39
ax.xaxis.grid(alpha=0.25)