Ticket #8599 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Allow size as an argument for point2d

Reported by: slabbe Owned by: slabbe
Priority: major Milestone: sage-4.4
Component: graphics Keywords:
Cc: Work issues:
Report Upstream: N/A Reviewers: Jason Grout
Authors: Sébastien Labbé Merged in: sage-4.4.alpha0
Dependencies: Stopgaps:

Description

For 3d points, one must use the argument size :

sage: point((2,3,4), size=100)

But for 2d points, one must use the argument pointsize :

sage: point((2,3), size=100)
verbose 0 (136: primitive.py, options) WARNING: Ignoring option 'size'=100
verbose 0 (136: primitive.py, options) 
The allowed options for Point set defined by 1 point(s) are:
    alpha          How transparent the line is.                                
    faceted        If True color the edge of the point.                        
    hue            The color given as a hue.                                   
    pointsize      How big the point is.                                       
    rgbcolor       The color as an RGB tuple.                                  
    zorder         The layer level in which to draw                            


sage: point((2,3), pointsize=100)

I think pointsize is kind of redundant and size would not be ambiguous. At least, if we keep pointsize for backward compatibility reasons, I would like

sage: point((2,3), size=100)

to work.

Attachments

trac_8599_pointsize-sl.patch Download (4.9 KB) - added by slabbe 3 years ago.
trac-8599-fix-docs.patch Download (1.7 KB) - added by jason 3 years ago.
apply on top of previous patch

Change History

comment:1 Changed 3 years ago by slabbe

  • Status changed from new to needs_review

Changed 3 years ago by slabbe

comment:2 Changed 3 years ago by slabbe

I improved a comment about pointsize vs size and just uploaded the patch.

comment:3 Changed 3 years ago by jason

  • Reviewers set to Jason Grout
  • Authors set to Sébastien Labbe, Jason Grout

Positive review on slabbe's patch.

I enhanced the documentation for pointsize, added a deprecation functionality for the rename decorator, and then deprecated the pointsize keyword in my patch. My patch needs to be reviewed now.

Changed 3 years ago by jason

apply on top of previous patch

comment:4 Changed 3 years ago by jason

  • Authors changed from Sébastien Labbe, Jason Grout to Sébastien Labbe

Okay, I moved the deprecation code over to #8607, since William requested that we don't deprecate the pointsize option (for mma compatibility). I've instead posted a new patch which just contains a few documentation enhancements and fixes. Sebastien, can you review my patch? If it's a positive review, then set this to positive review.

comment:5 Changed 3 years ago by slabbe

  • Status changed from needs_review to positive_review
  • Authors changed from Sébastien Labbe to Sébastien Labbé

Positive review for Jason's doc fixes.

#8607 = great!

comment:6 Changed 3 years ago by jhpalmieri

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-4.4.alpha0

Merged in 4.4.alpha0:

  • trac_8599_pointsize-sl.patch
  • trac-8599-fix-docs.patch
Note: See TracTickets for help on using tickets.