#13423: arrow2d missing 'linestyle' parameter docs
-----------------------------------------------------------+----------------
       Reporter:  mjo                                      |         Owner:  
jason, was  
           Type:  defect                                   |        Status:  
needs_review
       Priority:  major                                    |     Milestone:  
sage-5.6    
      Component:  graphics                                 |    Resolution:     
         
       Keywords:  beginner                                 |   Work issues:     
         
Report Upstream:  N/A                                      |     Reviewers:     
         
        Authors:  Michael Orlitzky, Punarbasu Purkayastha  |     Merged in:     
         
   Dependencies:                                           |      Stopgaps:     
         
-----------------------------------------------------------+----------------
Changes (by {'newvalue': u'Michael Orlitzky, Punarbasu Purkayastha', 
'oldvalue': u'Michael Orlitzky'}):

  * author:  Michael Orlitzky => Michael Orlitzky, Punarbasu Purkayastha


Old description:

> From sage/plot/arrow.py:
>
> {{{
> @rename_keyword(color='rgbcolor')
> @options(width=2, rgbcolor=(0,0,1),zorder=2, head = 1, linestyle='solid',
> legend_label=None)
> def arrow2d(tailpoint=None, headpoint=None, path=None, **options):
> ...
> }}}
>
> This works, but the docstring doesn't mention it:
>
> {{{
> INPUT:
>
>     - ``tailpoint`` - the starting point of the arrow
>
>     - ``headpoint`` - where the arrow is pointing to
>
>     - ``path`` - the list of points and control points (see bezier_path
> for detail) that
>       the arrow will follow from source to destination
>
>     - ``head`` - 0, 1 or 2, whether to draw the head at the start (0),
> end (1) or both (2)
>       of the path (using 0 will swap headpoint and tailpoint).  This is
> ignored
>       in 3D plotting.
>
>     - ``width`` - (default: 2) the width of the arrow shaft, in points
>
>     - ``color`` - (default: (0,0,1)) the color of the arrow (as an RGB
> tuple or a string)
>
>     - ``hue`` - the color of the arrow (as a number)
>
>     - ``arrowsize`` - the size of the arrowhead
>
>     - ``arrowshorten`` - the length in points to shorten the arrow
> (ignored if using path
>       parameter)
>
>     - ``legend_label`` - the label for this item in the legend
>
>     - ``zorder`` - the layer level to draw the arrow-- note that this is
> ignored in 3D
>       plotting.
>
>     EXAMPLES:
> ...
> }}}

New description:

 From sage/plot/arrow.py:

 {{{
 @rename_keyword(color='rgbcolor')
 @options(width=2, rgbcolor=(0,0,1),zorder=2, head = 1, linestyle='solid',
 legend_label=None)
 def arrow2d(tailpoint=None, headpoint=None, path=None, **options):
 ...
 }}}

 This works, but the docstring doesn't mention it:

 {{{
 INPUT:

     - ``tailpoint`` - the starting point of the arrow

     - ``headpoint`` - where the arrow is pointing to

     - ``path`` - the list of points and control points (see bezier_path
 for detail) that
       the arrow will follow from source to destination

     - ``head`` - 0, 1 or 2, whether to draw the head at the start (0), end
 (1) or both (2)
       of the path (using 0 will swap headpoint and tailpoint).  This is
 ignored
       in 3D plotting.

     - ``width`` - (default: 2) the width of the arrow shaft, in points

     - ``color`` - (default: (0,0,1)) the color of the arrow (as an RGB
 tuple or a string)

     - ``hue`` - the color of the arrow (as a number)

     - ``arrowsize`` - the size of the arrowhead

     - ``arrowshorten`` - the length in points to shorten the arrow
 (ignored if using path
       parameter)

     - ``legend_label`` - the label for this item in the legend

     - ``zorder`` - the layer level to draw the arrow-- note that this is
 ignored in 3D
       plotting.

     EXAMPLES:
 ...
 }}}

 ----
 Apply to devel/sage:
 1. [attachment:sage-trac_13423.patch]
 2. [attachment:trac_13423-linestyle_options_for_arrow.patch]

--

Comment:

 Since mpl is unresponsive to my mail, I have added a new patch to make
 sure that the usual linestyle options are possible to be used with the
 `arrow` command. Even more advanced linestyles are possible in matplotlib
 by passing tuples to the `linestyle` option, but that method is properly
 documented only in the POSTSCRIPT reference manual.

 I am ok with the earlier patch. If you feel that my patch is OK, then you
 can set this to positive review.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13423#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to