-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathREADME
More file actions
90 lines (82 loc) · 2.99 KB
/
README
File metadata and controls
90 lines (82 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Workflow:
|====> *.dat
*.sh — — — —>DATA
| |====> *.cfg
| /
| /
| /
| /
|====>pythons/*.py
| \
v====>cfgs/para.cfg
(1) top-level shell file ‘*.sh’ gets data file paths from cfg file ‘cfgs/para.cfg’;
(2) within the specified data file path, ‘*.sh’ then scans to find data file (*.dat) and figure property file (*.cfg);
(2) ‘*.sh’ then calls the corresponding python file to draw;
(3) python calling format:
python python_file data_file figure_cfg_file section_name_in_figure_cfg_file
e.g.,
`python $PY_DIR/bar.py $data $bar_CFG_DIR/bar.cfg “read ratio figure”`
(4) generated figure files (*.eps/*.png/*.pdf, …) are saved into the data file directory;
Note: file name is automatically created by appending figure extension to data file
(5) provide the ‘*.pdf’ (by default, *.eps are converted to *.pdf) file path to your latex file.
e.g.,
\includegraphics[width=3in]{figures/rst/DATA/{stat_energyEDP.dat}.pdf}
How to run?
(1) prepare your data in the required format (see example data files or *.dat.format files;
if you are collecting data with scripts, then it is easy to follow the format;
(2) edit ‘cfgs/para.cfg’ and shell file to locate your data files;
(3) update the figure cfg file (e.g., figure size, color, pattern and gap, etc);
Note: I tried to make as many settings be not hard-coded.
However, to avoid messy config, many others
(e.g., major/minor ticks and figure dpi, etc)
are still hard coded in the python files.
If you need different settings of such parameters,
then please hack the python files;
(4) specify which figure cfg file (bar./stacked./y2.cfg) to use and set the section (e.g., “xxx figure”) for each figure.
Checklist:
README: this file
*.figures.sh : shell file to call python
pythons/ : python graph files
cfgs/ : data path configuration files
DATA/ : source data files
example paper/ : main figures in the paper were created with those scripts
============= historic bar:
sh: bar.figures.sh
py: bar.py
path cfg: cfgs/para.cfg
draw cfg: bar.test.DATA/bar.cfg
data: bar.test.DATA/*.dat
out: bar.test.DATA/*.pdf
============= stacked bar:
sh: stacked.figures.sh
py: stacked/stacked_[12].py
path cfg: cfgs/para.cfg
draw cfg: stacked.test.DATA/stacked.cfg
data: stacked.test.DATA/*.dat
out: stacked.test.DATA/*.pdf
============= double y axis:
sh: y2.figures.sh
py: y2.py
path cfg: cfgs/para.cfg
draw cfg: cfgs/y2.cfg
data: y2.test.DATA/*.dat
out: y2.test.DATA/*.eps
============= line (will be merged later):
sh: {line/log_line/subp_line}.figures.sh
py: {line/usual_line/log_line/subp_line}.py
path cfg: cfgs/para.cfg
draw cfg:
line.test.DATA/line.cfg
line.test.DATA/usual_line.cfg
log_line.test.DATA/log_line.cfg
subp_line.test.DATA/subp_line.cfg
data: *.test.DATA/*.dat
out: *.test.DATA/*.pdf
============= fun (will be improved later):
sh: func.figures.sh
py: func/{leak/rc/tret_20nm/tret_60nm}.py
path cfg: cfgs/para.cfg
draw cfg:
func.test.DATA/{leak/rc/tret}.cfg
data: func.test.DATA/*.dat
out: func.test.DATA/*.pdf