sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 481 forks source link

Allow plotting more complex points #9982

Open kcrisman opened 14 years ago

kcrisman commented 14 years ago

See #4838 and #8082 for the first addition of this. Unfortunately, it only supports things like CC:

sage: point([CC(1.00000000000000 + 0.500000000000000*I)]) # works
sage: point([1.00000000000000 + 0.500000000000000*I]) # nope

A little experimentation suggests that Python complexes also aren't supported. Fixing this should also allow plotting lines in the complex plane pretty easily.

Also

sage: list_plot([1, I]) # works
sage: point([1, I]) # does not work
sage: point([I, 1]) # does not work
sage: point([CC(I), CC(1)]) # works

I'm labeling this a defect rather than enhancement because it would be confusing not to have both.

CC: @jasongrout @videlec

Component: graphics

Issue created by migration from https://trac.sagemath.org/ticket/9982

kcrisman commented 12 years ago
comment:1

Notice that

sage: list_plot([1.00000000000000 + 0.500000000000000*I])

does work.

ppurka commented 11 years ago

Description changed:

--- 
+++ 
@@ -7,4 +7,12 @@

 A little experimentation suggests that Python complexes also aren't supported.  Fixing this should also allow plotting `line`s in the complex plane pretty easily.

+Also
+
+```
+sage: list_plot([1, I]) # works
+sage: point([1, I]) # does not work
+sage: point([I, 1]) # does not work
+sage: point([CC(I), CC(1)]) # works
+```
 I'm labeling this a defect rather than enhancement because it would be confusing not to have both.
videlec commented 11 years ago
comment:3

That's great that you cced me ! I would like to mention that the result of the two following commands are different (and should not be)

sage: point2d([CC(0),CC(1)])      # two points at coordinates (0,0) and (1,0)
sage: point2d([CDF(0),CDF(1)])    # one point at coordinate (0,1)

Perhaps that will be resolved with this ticket.