From 00cba285c82fe032be7e66d4eea2b4aa1718454e Mon Sep 17 00:00:00 2001 From: "Michael Pilosov, PhD" Date: Tue, 13 Feb 2024 03:34:31 +0000 Subject: [PATCH] minor tweaks, check annotations --- makefile | 11 +++++------ scripts/sortcolor.py | 7 ++++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/makefile b/makefile index c382803..81ef87f 100644 --- a/makefile +++ b/makefile @@ -52,16 +52,15 @@ animate: umap: for seed in `seq 0 100`; do \ - python scripts/sortcolor.py -s umap --seed $$seed --dpi 100 --size 6 ; \ + python scripts/sortcolor.py -s umap --seed $$seed --dpi 300 ; \ done -lex: - python scripts/sortcolor.py -s lex --dpi 300 --size 6 --radius 0.5 +sort_lex: + python scripts/sortcolor.py -s lex --dpi 300 --fontsize 12 -arrange: - python scripts/sortcolor.py -s hsv --dpi 100 --size 3 && \ - sh scripts/place.sh +sort_hsv: + python scripts/sortcolor.py -s hsv --dpi 300 clean: diff --git a/scripts/sortcolor.py b/scripts/sortcolor.py index f15d460..fedccf9 100644 --- a/scripts/sortcolor.py +++ b/scripts/sortcolor.py @@ -251,8 +251,7 @@ def plot_preds( ax.set_aspect("equal") ax.axis("off") radius = 1 - ax.set_ylim(-radius, radius) - ax.set_xlim(-radius, radius) + ax.set_ylim(0, radius) # Overlay white circle circle = patches.Circle( @@ -261,6 +260,8 @@ def plot_preds( ax.add_patch(circle) if FONTSIZE > 0.0: + center = (0, 0) + fcolor = "black" ax.annotate( f"{KIND.upper()}", center, @@ -272,7 +273,7 @@ def plot_preds( fig.tight_layout(pad=0) - plt.savefig(fname, dpi=dpi, transparent=False, pad_inches=0, bbox_inches="tight") + plt.savefig(fname, dpi=dpi, transparent=True, pad_inches=0, bbox_inches="tight") plt.close()