Changeset 7867:f843ab589376


Ignore:
Timestamp:
12/22/07 14:07:56 (5 years ago)
Author:
William Stein <wstein@…>
Branch:
default
Children:
7868:11c9d8388d66, 7888:d12fcefadeb1
Message:

Trac #156: A few fixes needed for plotting to work again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sage/plot/plot.py

    r7866 r7867  
    16931693            options[k] = v 
    16941694 
    1695         done = False 
    16961695        if not isinstance(points, (list,tuple)) or \ 
    16971696           (isinstance(points,(list,tuple)) and len(points) <= 3 and not 
     
    17021701                pass 
    17031702 
    1704         if not done: 
    1705             if coerce: 
    1706                 xdata = [] 
    1707                 ydata = [] 
    1708                 for z in points: 
    1709                     if len(z) == 3: 
    1710                         return self._graphic3d()(points, coerce=coerce, **kwds) 
    1711                     xdata.append(float(z[0])) 
    1712                     ydata.append(float(z[1])) 
    1713             else: 
    1714                 for z in points: 
    1715                     if len(z) == 3: 
    1716                         return self._graphic3d()(points, coerce=coerce, **kwds) 
    1717                     xdata.append(z[0]) 
    1718                     ydata.append(z[1]) 
     1703        xdata = [] 
     1704        ydata = [] 
     1705        if coerce: 
     1706            for z in points: 
     1707                if len(z) == 3: 
     1708                    return self._graphic3d()(points, coerce=coerce, **kwds) 
     1709                xdata.append(float(z[0])) 
     1710                ydata.append(float(z[1])) 
     1711        else: 
     1712            for z in points: 
     1713                if len(z) == 3: 
     1714                    return self._graphic3d()(points, coerce=coerce, **kwds) 
     1715                xdata.append(z[0]) 
     1716                ydata.append(z[1]) 
    17191717 
    17201718        return self._from_xdata_ydata(xdata, ydata, True, options=options) 
Note: See TracChangeset for help on using the changeset viewer.