Skip to content

Commit

Permalink
Merge pull request #47 from stevenengler/line-styles
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenengler authored Feb 6, 2023
2 parents e9ab8ac + acbc928 commit 77a0d12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/tgentools/tgentools
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ will override the default pattern 'tgen.*\.log'.""",
matplotlib's plot command (see matplotlib.pyplot.plot)""",
metavar="LIST", type=str,
action="store", dest="lineformats",
default=util.LINEFORMATS)
default=util.LINE_FORMATS)

visualize_parser.add_argument('-e', '--expression',
help="""Append a regex PATTERN to a custom list of strings used with
Expand Down
7 changes: 6 additions & 1 deletion tools/tgentools/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
except ImportError:
from io import StringIO

LINEFORMATS = "k-,r-,b-,g-,c-,m-,y-,k--,r--,b--,g--,c--,m--,y--,k:,r:,b:,g:,c:,m:,y:,k-.,r-.,b-.,g-.,c-.,m-.,y-."
LINE_COLORS = ['k', 'r', 'b', 'g', 'c', 'm', 'y']
LINE_STYLES = ['-', '--', '-.', ':']

# since there are 7 colors and 4 styles (no common factor), there will be 28
# distinct color/style combinations before it repeats
LINE_FORMATS = ','.join([x[0] + x[1] for x in zip(LINE_COLORS*10, LINE_STYLES*10)])

def make_dir_path(path):
p = os.path.abspath(os.path.expanduser(path))
Expand Down

0 comments on commit 77a0d12

Please sign in to comment.