sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 479 forks source link

graphics documentation obscure #23380

Open videlec opened 7 years ago

videlec commented 7 years ago

The one line description of text refers to arguments (x,y) that do not appear in the signature

Signature:      text(*args, **kwds)
Docstring:     
   Returns a 2D text graphics object at the point (x,y).

   Type "text.options" for a dictionary of options for 2D text.
...

Idem for point2d (that even refers to size)

Signature:      point2d(*args, **kwds)
Docstring:     
   A point of size "size" defined by point = (x,y).
...

Or for polygon2d

Signature:      polygon2d(*args, **kwds)
Docstring:     
   Returns a 2-dimensional polygon defined by "points".

The first examples of line2d are completely useless

Signature:      line2d(*args, **kwds)
Docstring:     
   Create the line through the given list of points.
...
EXAMPLES:

   A line with no points or one point:

      sage: line([])      #returns an empty plot
      Graphics object consisting of 0 graphics primitives
      sage: import numpy; line(numpy.array([]))
      Graphics object consisting of 0 graphics primitives
      sage: line([(1,1)])
      Graphics object consisting of 1 graphics primitive

CC: @mforets

Component: documentation

Issue created by migration from https://trac.sagemath.org/ticket/23380

videlec commented 7 years ago

Description changed:

--- 
+++ 
@@ -9,7 +9,7 @@
    Type "text.options" for a dictionary of options for 2D text.
 ...

-Idem for point2d (that even refers to size) +Idem for point2d (that even refers to size)

 Signature:      point2d(*args, **kwds)
videlec commented 7 years ago

Description changed:

--- 
+++ 
@@ -17,7 +17,7 @@
    A point of size "size" defined by point = (x,y).
 ...

-The first examples of line2d are completely useless +The first examples of line2d are completely useless

 Signature:      line2d(*args, **kwds)
videlec commented 7 years ago

Description changed:

--- 
+++ 
@@ -1,7 +1,6 @@
 The one line description of `text` refers to arguments `(x,y)` that do not appear in the signature

-sage: text? Signature: text(*args, **kwds) Docstring:
Returns a 2D text graphics object at the point (x,y). @@ -17,6 +16,14 @@ A point of size "size" defined by point = (x,y). ...

+Or for `polygon2d`
+
+```
+Signature:      polygon2d(*args, **kwds)
+Docstring:     
+   Returns a 2-dimensional polygon defined by "points".
+```
+
 The first examples of `line2d` are completely useless