Skip to content

Commit

Permalink
Updated export plot mode allowing list produced with Partition to hav…
Browse files Browse the repository at this point in the history
…e different lengths
  • Loading branch information
micheledinelli committed May 12, 2024
1 parent 5988e65 commit e74a186
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WordVec.wl
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ plotEmbeddings[words_, OptionsPattern[{ExportMode -> False}]] := Module[

If[exportMode,
(* Split the list of words into rows, each containing up to 5 words *)
wordRows = Partition[words, 5];

wordRows = Partition[words, UpTo[5]];
(* Create rows to place them beneath the 3D plot *)
textRows = Map[GraphicsRow[Text[Style[#, 8]] & /@ #] &, wordRows];

Expand Down

0 comments on commit e74a186

Please # to comment.