add chaikin generator and group3

This commit is contained in:
Motiejus Jakštys 2020-06-18 10:03:55 +03:00
parent 7480da3279
commit c452e595f0
2 changed files with 10 additions and 4 deletions

View File

@ -34,12 +34,11 @@ db/.faux_$(1)_$(2)_%: $(2).sql db/.faux_ready
-v tbl=$(1)_$(2)_$$* \ -v tbl=$(1)_$(2)_$$* \
-f $(2).sql -f $(2).sql
touch $$@ touch $$@
db/.chaikin_$(1)_%: chaikin.sql db/.faux_ready db/.chaikin_$(1)_$(2)_%: db/.faux_$(1)_$(2)_% chaikin.sql
./managedb -- --echo-all \ ./managedb -- --echo-all \
-v ON_ERROR_STOP=1 \ -v ON_ERROR_STOP=1 \
-v src=$(1) \ -v src=$(1)_$(2)_$$* \
-v param1=$$* \ -v tbl=chaikin_$(1)_$(2)_$$* \
-v tbl=chaikin_$(1)_$$* \
-f chaikin.sql -f chaikin.sql
touch $$@ touch $$@
$(1)_$(2)_%.pdf: layer2img.py db/.faux_$(1)_$(2)_% $(1)_$(2)_%.pdf: layer2img.py db/.faux_$(1)_$(2)_%

View File

@ -35,6 +35,10 @@ def parse_args():
group2 = parser.add_mutually_exclusive_group() group2 = parser.add_mutually_exclusive_group()
group2.add_argument('--group2-infile', type=str) group2.add_argument('--group2-infile', type=str)
group2.add_argument('--group2-table', type=str) group2.add_argument('--group2-table', type=str)
group3 = parser.add_mutually_exclusive_group()
group3.add_argument('--group3-infile', type=str)
group3.add_argument('--group3-table', type=str)
return parser.parse_args() return parser.parse_args()
@ -51,6 +55,7 @@ def main():
args = parse_args() args = parse_args()
group1 = read_layer(args.group1_table, args.group1_infile) group1 = read_layer(args.group1_table, args.group1_infile)
group2 = read_layer(args.group2_table, args.group2_infile) group2 = read_layer(args.group2_table, args.group2_infile)
group3 = read_layer(args.group3_table, args.group3_infile)
rc('text', usetex=True) rc('text', usetex=True)
fig, ax = plt.subplots() fig, ax = plt.subplots()
@ -64,6 +69,8 @@ def main():
group1.plot(ax=ax, color=PURPLE) group1.plot(ax=ax, color=PURPLE)
if group2 is not None: if group2 is not None:
group2.plot(ax=ax, color=ORANGE) group2.plot(ax=ax, color=ORANGE)
if group3 is not None:
group3.plot(ax=ax, color=GREEN)
ax.axis('off') ax.axis('off')
ax.margins(0, 0) ax.margins(0, 0)