colored dotted lines

This commit is contained in:
Motiejus Jakštys 2021-05-09 14:00:35 +03:00
parent d3d21db8af
commit 833b969ced
2 changed files with 9 additions and 16 deletions

View File

@ -90,6 +90,7 @@ $(1).pdf: layer2img.py Makefile $(2)
$$(if $$($(1)_WIDTHDIV),--widthdiv=$$($(1)_WIDTHDIV)) \ $$(if $$($(1)_WIDTHDIV),--widthdiv=$$($(1)_WIDTHDIV)) \
$$(if $$($(1)_QUADRANT),--quadrant=$$($(1)_QUADRANT)) \ $$(if $$($(1)_QUADRANT),--quadrant=$$($(1)_QUADRANT)) \
$$(foreach i,1 2 3, \ $$(foreach i,1 2 3, \
$$(if $$($(1)_$$(i)COLOR),--group$$(i)-color="$$($(1)_$$(i)COLOR)") \
$$(if $$($(1)_$$(i)SELECT),--group$$(i)-select="$$($(1)_$$(i)SELECT)") \ $$(if $$($(1)_$$(i)SELECT),--group$$(i)-select="$$($(1)_$$(i)SELECT)") \
$$(if $$($(1)_$$(i)LINESTYLE),--group$$(i)-linestyle="$$($(1)_$$(i)LINESTYLE)") \ $$(if $$($(1)_$$(i)LINESTYLE),--group$$(i)-linestyle="$$($(1)_$$(i)LINESTYLE)") \
) )
@ -161,6 +162,8 @@ selfcrossing-1-after_2LINESTYLE = invisible
isolated-1-before_WIDTHDIV = 2 isolated-1-before_WIDTHDIV = 2
isolated-1-before_1SELECT = wm_debug where name='isolated-1' AND stage='bbends' AND gen=1 isolated-1-before_1SELECT = wm_debug where name='isolated-1' AND stage='bbends' AND gen=1
isolated-1-before_2SELECT = wm_debug where name='isolated-1' AND stage='gexaggeration' AND gen=1 isolated-1-before_2SELECT = wm_debug where name='isolated-1' AND stage='gexaggeration' AND gen=1
isolated-1-before_2LINESTYLE = dotted
isolated-1-before_2COLOR = black
salvis-25k_1SELECT = wm_visuals where name='salvis' salvis-25k_1SELECT = wm_visuals where name='salvis'
salvis-25k_WIDTHDIV = 1 salvis-25k_WIDTHDIV = 1

View File

@ -26,25 +26,15 @@ def parse_args():
description='Convert a geometry to an image') description='Convert a geometry to an image')
parser.add_argument('--group1-select') parser.add_argument('--group1-select')
parser.add_argument('--group1-linestyle') parser.add_argument('--group1-linestyle')
parser.add_argument('--group1-color', default=BLACK)
simplify = parser.add_mutually_exclusive_group()
simplify.add_argument('--group1-simplifydp', type=int)
simplify.add_argument('--group1-simplifyvw', type=int)
parser.add_argument('--group1-chaikin', type=bool)
parser.add_argument('--group2-select') parser.add_argument('--group2-select')
parser.add_argument('--group2-linestyle') parser.add_argument('--group2-linestyle')
simplify = parser.add_mutually_exclusive_group() parser.add_argument('--group2-color', default=ORANGE)
simplify.add_argument('--group2-simplifydp', type=int)
simplify.add_argument('--group2-simplifyvw', type=int)
parser.add_argument('--group2-chaikin', type=bool)
parser.add_argument('--group3-select') parser.add_argument('--group3-select')
parser.add_argument('--group3-linestyle') parser.add_argument('--group3-linestyle')
simplify = parser.add_mutually_exclusive_group() parser.add_argument('--group3-color', default=GREEN)
simplify.add_argument('--group3-simplifydp', type=int)
simplify.add_argument('--group3-simplifyvw', type=int)
parser.add_argument('--group3-chaikin', type=bool)
parser.add_argument('--widthdiv', parser.add_argument('--widthdiv',
default=1, type=float, help='Width divisor') default=1, type=float, help='Width divisor')
@ -95,9 +85,9 @@ def main():
group1 = read_layer(args.group1_select, width, args.quadrant) group1 = read_layer(args.group1_select, width, args.quadrant)
group2 = read_layer(args.group2_select, width, args.quadrant) group2 = read_layer(args.group2_select, width, args.quadrant)
group3 = read_layer(args.group3_select, width, args.quadrant) group3 = read_layer(args.group3_select, width, args.quadrant)
c1 = plot_args(group1, BLACK, args.group1_linestyle) c1 = plot_args(group1, args.group1_color, args.group1_linestyle)
c2 = plot_args(group2, ORANGE, args.group2_linestyle) c2 = plot_args(group2, args.group2_color, args.group2_linestyle)
c3 = plot_args(group3, GREEN, args.group3_linestyle) c3 = plot_args(group3, args.group3_color, args.group3_linestyle)
rc('text', usetex=True) rc('text', usetex=True)
fig, ax = plt.subplots() fig, ax = plt.subplots()