This commit is contained in:
Motiejus Jakštys 2021-05-19 22:57:47 +03:00 committed by Motiejus Jakštys
parent b6db6eff8a
commit f3bc22b5ba
3 changed files with 5 additions and 5 deletions

View File

@ -49,7 +49,7 @@ test-figures.pdf: layer2img.py .faux_test
fig-definition-of-a-bend.pdf: layer2img.py Makefile .faux_test
python ./layer2img.py \
--group1-table=wm_debug \
--group1-cmap=True \
--group1-cmap=1 \
--group1-where="name='fig6' AND stage='bbends-polygon' AND gen=1" \
--group2-table=wm_debug \
--group2-where="name='fig6' AND stage='bbends' AND gen=1" \

View File

@ -59,6 +59,9 @@ def main():
group1 = read_layer(args.group1_table, args.group1_where)
group2 = read_layer(args.group2_table, args.group2_where)
group3 = read_layer(args.group3_table, args.group3_where)
c1 = {'cmap': 'coolwarm'} if args.group1_cmap else {'color': ORANGE}
c2 = {'cmap': 'coolwarm'} if args.group2_cmap else {'color': PURPLE}
c3 = {'cmap': 'coolwarm'} if args.group3_cmap else {'color': GREEN}
rc('text', usetex=True)
fig, ax = plt.subplots()
@ -68,10 +71,6 @@ def main():
ax.set_xlim(left=c[0], right=c[2])
ax.set_ylim(bottom=c[1], top=c[3])
c1 = {'cmap': 'coolwarm'} if args.group1_cmap else {'color': ORANGE}
c2 = {'cmap': 'coolwarm'} if args.group2_cmap else {'color': PURPLE}
c3 = {'cmap': 'coolwarm'} if args.group3_cmap else {'color': GREEN}
group1 is not None and group1.plot(ax=ax, **c1)
group2 is not None and group2.plot(ax=ax, **c2)
group3 is not None and group3.plot(ax=ax, **c3)

View File

@ -41,6 +41,7 @@ insert into wm_figures (name, way) values ('fig6-combi',
ST_Translate((select way from wm_figures where name='fig6'), 80, 90)
)
);
insert into wm_figures (name, way) values('fig8', ST_GeomFromText('LINESTRING(173 12,174 10,180 8,186 8,186 13,191 11,189 6,201 5,203 11,216 16,216 6,222 7,229 3,236 2,239 6,243 8,248 6)'));
insert into wm_figures (name, way) values ('inflection-1',ST_GeomFromText('LINESTRING(110 24,114 20,133 20,145 15,145 0,136 5,123 7,114 7,111 2)'));
insert into wm_figures (name, way) values ('multi-island',ST_GeomFromText('MULTILINESTRING((-15 10,-10 10,-5 11,0 11,5 11,10 10,11 9,13 10,15 9),(-5 11,-2 15,0 16,2 15,5 11))'));