Skip to content

Commit

Permalink
Remove figure title and axis labels and ticks for 2D embeddings plots
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanpainchaud committed Nov 25, 2023
1 parent 811f84f commit 24ffd75
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions didactic/scripts/cardiac_multimodal_representation_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def plot_patients_embeddings(
cat_attrs_order.update({attr: list(attr_lists) for attr, attr_lists in categorical_attrs_lists.items()})

# Plot data w.r.t. attributes
return zip(
for attr, plot in zip(
plot_attrs,
embedding_scatterplot(
patient_encodings,
Expand All @@ -129,7 +129,9 @@ def plot_patients_embeddings(
data_tag="encoding",
**embedding_kwargs,
),
)
):
plot.set(title=None, xlabel=None, xticklabels=[], ylabel=None, yticklabels=[])
yield attr, plot


def main():
Expand Down Expand Up @@ -259,7 +261,7 @@ def main():
embedding_kwargs=embedding_kwargs,
):
# Save the plots locally
plt.savefig(output_dir / f"{attr}.svg")
plt.savefig(output_dir / f"{attr}.svg", bbox_inches="tight")
plt.close() # Close the figure to avoid contamination between plots


Expand Down

0 comments on commit 24ffd75

Please sign in to comment.