# HG changeset patch
# User Vincent Delecroix <20100.delecroix at gmail.com>
# Date 1264531168 -3600
# Node ID bec31f40df51aee882135c605ded0879a586437f
# Parent 21efb0b3fc474972b5c7f617d99173536a3d79d0
[mq]: plot_correction.patch
diff -r 21efb0b3fc47 -r bec31f40df51 sage/plot/plot.py
a
|
b
|
|
2070 | 2070 | yields a list of one or two numbers. |
2071 | 2071 | |
2072 | 2072 | This function can potentially be very slow for large point sets. |
| 2073 | |
| 2074 | TESTS:: |
| 2075 | |
| 2076 | sage: from sage.plot.plot import xydata_from_point_list |
| 2077 | sage: xydata_from_point_list([CC(0), CC(1)]) # ticket 8082 |
| 2078 | ([0.0, 1.0], [0.0, 0.0]) |
2073 | 2079 | """ |
| 2080 | from sage.rings.complex_number import ComplexNumber |
2074 | 2081 | if not isinstance(points, (list,tuple)): |
2075 | 2082 | try: |
2076 | 2083 | points = [[float(z) for z in points]] |
2077 | 2084 | except TypeError: |
2078 | 2085 | pass |
2079 | | elif len(points)==2 and not isinstance(points[0], (list,tuple)): |
| 2086 | elif len(points)==2 and not isinstance(points[0],(list,tuple,ComplexNumber)): |
2080 | 2087 | try: |
2081 | 2088 | points = [[float(z) for z in points]] |
2082 | 2089 | except TypeError: |