Changeset 7888:d12fcefadeb1
- Timestamp:
- 12/23/07 08:08:11 (5 years ago)
- Branch:
- default
- File:
-
- 1 edited
-
sage/plot/plot.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sage/plot/plot.py
r7867 r7888 1701 1701 pass 1702 1702 1703 try: 1704 if len(points) > 0 and len(points[0]) == 3: 1705 return self._graphic3d()(points, coerce=coerce, **kwds) 1706 except (AttributeError, TypeError): 1707 pass 1703 1708 xdata = [] 1704 1709 ydata = [] 1705 1710 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 xdata = [float(z[0]) for z in points] 1712 ydata = [float(z[1]) for z in points] 1711 1713 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]) 1714 xdata = [z[0] for z in points] 1715 ydata = [z[1] for z in points] 1717 1716 1718 1717 return self._from_xdata_ydata(xdata, ydata, True, options=options) … … 1945 1944 sage: p = line(L, rgbcolor=(1/4,1/8,3/4)) 1946 1945 sage: p.show() 1946 1947 A line with 2 complex points: 1948 sage: i = CC.0 1949 sage: show(line([1+i, 2+3*i])) 1947 1950 1948 1951 A blue hypotrochoid (3 leaves): 1949 1950 1952 sage: n = 4; h = 3; b = 2 1951 1953 sage: L = [[n*cos(pi*i/100)+h*cos((n/b)*pi*i/100),n*sin(pi*i/100)-h*sin((n/b)*pi*i/100)] for i in range(200)]
Note: See TracChangeset
for help on using the changeset viewer.
