Opened 9 years ago

Closed 9 years ago

#12836 closed defect (fixed)

arrows are shortened too much

Reported by: jason Owned by: jason, was
Priority: major Milestone: sage-5.1
Component: graphics Keywords:
Cc: kcrisman Merged in: sage-5.1.beta1
Authors: Jason Grout Reviewers: Michael Orlitzky
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Apparently 3 years ago, when I made an update patch for matplotlib, I put in some default shortening of arrows. Matplotlib already shortens its arrows to account for line width, so with my shortening and matplotlib's shortening, arrows were always way shorter than they were intended. This patch removes Sage's default shortening of arrows.

Attachments (4)

trac-12836-arrow-shorten.patch (799 bytes) - added by jason 9 years ago.
before.png (9.8 KB) - added by mjo 9 years ago.
after.png (9.8 KB) - added by mjo 9 years ago.
sage-trac_12836-review.patch (1.1 KB) - added by mjo 9 years ago.
Add a doctest.

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by jason

comment:1 Changed 9 years ago by jason

  • Cc kcrisman added
  • Status changed from new to needs_review

Needless to say, since it's a graphics change, people better look at it so people don't get terribly offended that there arrows look a little better :).

Changed 9 years ago by mjo

Changed 9 years ago by mjo

Changed 9 years ago by mjo

Add a doctest.

comment:2 Changed 9 years ago by mjo

  • Reviewers set to Michael Orlitzky

This change looks fine. The before/after.png show an arrow from the origin to (1,1) before and after the patch. I added a doctest that creates two arrows with different line widths, and checks that their shrinkA and shrinkB values are the same.

There's a chance I'm doing something dumb in the doctest, but positive review otherwise.

comment:3 Changed 9 years ago by jason

  • Status changed from needs_review to positive_review

Your doctest patch looks good.

comment:4 Changed 9 years ago by jdemeyer

  • Milestone changed from sage-5.0 to sage-5.1

comment:5 Changed 9 years ago by jdemeyer

  • Merged in set to sage-5.1.beta1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.