Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better margin calculation #118

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

okajimad
Copy link

This PR improves the problem of point names going outside the area.
With draw_point, the range of coordinates is calculated and then tabulated.

(before)
before

(after)
after

@@ -1224,15 +1228,11 @@ def draw(
else:
ax.set_facecolor((1.0, 1.0, 1.0))

_draw(ax, points, lines, circles, goal, equals, highlights)
xmin, xmax, ymin, ymax = _draw(ax, points, lines, circles, goal, equals, highlights)

plt.axis('equal')
fig.subplots_adjust(left=0, right=1, top=1, bottom=0, wspace=0, hspace=0)
if points:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is worthwhile to eliminate the inefficient loop here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant