Skip to content

Commit

Permalink
more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
srush committed Aug 18, 2024
1 parent 3db6740 commit 0d25d72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions chalk/backend/matplotlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def patches_to_file(
) -> None:
fig, ax = plt.subplots()
render_patches(patches, ax)
ax.set_xlim((0, width))
ax.set_ylim((-height, 0))
ax.set_xlim((0, width)) # type: ignore
ax.set_ylim((-height, 0)) # type: ignore
ax.set_aspect("equal")
plt.subplots_adjust(left=0, right=1, top=1, bottom=0)
ax.set_axis_off()
Expand Down
2 changes: 1 addition & 1 deletion chalk/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def from_point(point: P2_t) -> Path:


def from_text(s: str) -> Path:
return Path((), Text(tx.np.frombuffer(s, dtype="<U3")))
return Path((), Text(tx.np.frombuffer(s.encode(encoding="utf-8"), dtype="<U3")))


def from_pairs(segs: List[Tuple[P2_t, P2_t]], closed: bool = False) -> Path:
Expand Down

0 comments on commit 0d25d72

Please sign in to comment.