diff --git a/scripts/treemap.py b/scripts/treemap.py index cd9d67c7..908ae7bc 100755 --- a/scripts/treemap.py +++ b/scripts/treemap.py @@ -717,6 +717,7 @@ def main(csv_paths, *, no_stats=False, to_scale=None, aspect_ratio=(1,1), + tiny=False, title=None, padding=0, label=False, @@ -729,6 +730,12 @@ def main(csv_paths, *, else: color = False + # tiny mode? + if tiny: + if to_scale is None: + to_scale = 1 + no_header = True + # what chars/colors/labels to use? chars_ = [] for char in chars: @@ -1155,6 +1162,10 @@ if __name__ == "__main__": tuple(float(v) for v in x.split(':', 1)) if ':' in x else (float(x), 1)), help="Aspect ratio to use with --to-scale. Defaults to 1:1.") + parser.add_argument( + '-t', '--tiny', + action='store_true', + help="Tiny mode, alias for --to-scale=1 and --no-header.") parser.add_argument( '--title', help="Add a title. Accepts %% modifiers.") diff --git a/scripts/treemapd3.py b/scripts/treemapd3.py index d54a2270..7e727a6d 100755 --- a/scripts/treemapd3.py +++ b/scripts/treemapd3.py @@ -567,11 +567,11 @@ def main(csv_paths, output, *, no_stats=False, to_scale=None, aspect_ratio=(1,1), + tiny=False, + nested=False, title=None, padding=1, no_label=False, - tiny=False, - nested=False, dark=False, font=FONT, font_size=FONT_SIZE,