Opened 11 years ago

Closed 11 years ago

#8082 closed enhancement (fixed)

correct point and line behavior with complex numbers

Reported by: vdelecroix Owned by: vdelecroix
Priority: major Milestone: sage-4.3.3
Component: graphics Keywords: plot, complex numbers
Cc: Merged in: sage-4.3.3.alpha0
Authors: Vincent Delecroix Reviewers: Ross Kyprianou
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by vdelecroix)

We have a strange behavior

sage: point(CC(0))  # plot a point with coordinates (0, 0)
sage: point(CC(1))  # plot a point with coordinates (1, 0)
sage: point([CC(0),CC(1)])  # plot a point with coordinates (0, 1)

The patch add a line in plot.py to correct this and get the two points (0,0) and (1,0) when doing

sage: point([CC(0), CC(1)])

see also #4838

Attachments (1)

trac_8082.patch (1.2 KB) - added by vdelecroix 11 years ago.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by vdelecroix

comment:1 Changed 11 years ago by vdelecroix

  • Description modified (diff)
  • Keywords complex numbers added
  • Status changed from new to needs_review

comment:2 Changed 11 years ago by vdelecroix

  • Status changed from needs_review to needs_work

comment:3 Changed 11 years ago by vdelecroix

  • Description modified (diff)
  • Status changed from needs_work to needs_review

comment:4 Changed 11 years ago by rossk

  • Status changed from needs_review to positive_review

Works as advertised

# (1) pre-patch, this plotted a point with coordinates (0, 1)
# (2) post-patch, this plots 2 points at (0,0) and (1,0) as designed
sage: point([CC(0),CC(1)])

# plot the 8 vertices of an octagon
sage: point([CC(cos(theta)+I*sin(theta)) for theta in srange(0, 2*pi, pi/4)],aspect_ratio=1)

comment:5 Changed 11 years ago by mpatel

The patch commit string is insufficiently descriptive. I've refreshed it to #8082: Correct point and line behavior with complex numbers in the queue for 4.3.3.alpha0.

comment:6 Changed 11 years ago by mpatel

  • Authors changed from vdelecroix to Vincent Delecroix
  • Merged in set to sage-4.3.3.alpha0
  • Resolution set to fixed
  • Reviewers set to Ross Kyprianou
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.