#12974: make Graphics class inheritable and some clean ups
-----------------------------------------+----------------------------------
       Reporter:  ppurka                 |         Owner:  jason, was         
           Type:  enhancement            |        Status:  needs_work         
       Priority:  major                  |     Milestone:  sage-5.1           
      Component:  graphics               |    Resolution:                     
       Keywords:  sd40.5                 |   Work issues:                     
Report Upstream:  N/A                    |     Reviewers:  Karl-Dieter Crisman
        Authors:  Punarbasu Purkayastha  |     Merged in:                     
   Dependencies:                         |      Stopgaps:                     
-----------------------------------------+----------------------------------

Old description:

> The first patch makes all the `.__attribute` into `._attribute` so that
> the `Graphics` class can be inherited in the future. This is desirable
> since all the important functions are present in this class. One will not
> lose anything in terms of existing functionality.
>
> The second patch does more cleanups, whitespace removal, and refactoring
> of one big bunch of code which is present twice in
> `Graphics().matplotlib()`.
>
> Passes all doctests in `devel/sage/sage/plot`. (The patches are created
> using 5.0-rc0)
> ----
> Apply patches in this order to `devel/sage`:
> 1. [attachment:trac_12974-fix_graphics_attributes_and_reorder_args.patch]
> 2. [attachment:trac_12974-refactor_and_whitespace_cleanups.patch]

New description:

 The first patch makes all the `.__attribute` into `._attribute` so that
 the `Graphics` class can be inherited in the future. This is desirable
 since all the important functions are present in this class. One will not
 lose anything in terms of existing functionality.

 The second patch does more cleanups, whitespace removal, and refactoring
 of one big bunch of code which is present twice in
 `Graphics().matplotlib()`.

 Passes all doctests in `devel/sage/sage/plot`. (The patches are created
 using 5.0-rc0)
 ----
 Apply patches in this order to `devel/sage`:
 1. [attachment:trac_12974-fix_graphics_attributes.patch]
 2. [attachment:trac_12974-refactor_and_whitespace_cleanups.patch]

--

Comment (by ppurka):

 1. I added the new file, where I don't reorder the arguments. Also, I ran
 the following sed expression (in zsh) to cleanup trailing whitespaces from
 `sage/plot`
 {{{
 ....rc0/devel/sage/sage/plotĀ» for i in **/*.py; do
  sed -i -e 's/[[:space:]]\+$//' "$i";
 done
 }}}

 2. I removed the backslash and replaced it with simple brackets
 3. I had also doctested the new matplotlib function, but it seems that
 went into the log plot code. Sorry for the mixup. The updated patch (the
 second patch) contains the doctest now.
 4. From the doctests in #4529, I found that there were other functions
 outside of `sage/plot` that were using attributes of `Graphics` as
 `_Graphics__object`, etc. All these are fixed now (in the first patch).

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12974#comment:4>
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