0
$\begingroup$

I tried to plot the complex values in Mathematica using the following code

ComplexListPlot[
 {-1.565553236342579`+0.5086219029293979` I,
  -1.330625340792095`+0.9667548836877041` I,
  -0.9430644117513098`+1.298005155976131` I,
  -0.46974165011582125`+1.4457161432870014` I
  }
]

but I got the output as

ComplexListPlot[{-1.565553236342579`+0.5086219029293979` I,-1.330625340792095`+0.9667548836877041` I,-0.9430644117513098`+1.298005155976131` I,-0.46974165011582125`+1.4457161432870014` I}]

Which is same as the input which I gave. Can anybody please help me.

$\endgroup$
  • $\begingroup$ See this: mathematica.stackexchange.com/search?q=complex+list+plot $\endgroup$ – math Jul 10 at 6:28
  • 2
    $\begingroup$ Your code works for me. Try clearing the kernel. $\endgroup$ – Bill Watts Jul 10 at 7:06
  • 2
    $\begingroup$ If I copy and paste your expression into a Mathematica notebook it produces a plot for me. I see that ComplexListPlot was added in V12, and your report hints that you may be working with a earlier version. $\endgroup$ – High Performance Mark Jul 10 at 7:09
0
$\begingroup$

If you have a version earlier than 12, you can simply split out the real and imaginary components of the data. For example:

myList = Table[Power[x, 3] /. x -> Exp[I t], {t, 0, 2 Pi, 0.1}]
ListPlot[{Re[#], Im[#]} & /@ myList]
$\endgroup$
  • $\begingroup$ ListPlot[ReIm /@ myList] $\endgroup$ – Bob Hanlon Jul 10 at 13:39
  • $\begingroup$ Thank you for your suggestions $\endgroup$ – vicky Jul 12 at 1:27
2
$\begingroup$
data = N@Array[Exp[(2 π I)/32 #] &, 32];

Mathematica v12

ComplexListPlot[
 data
 , AspectRatio -> 1
 , PlotTheme -> "Scientific"
 ]

Mathematica v10

ListPlot[
 ReIm @ data
 , AspectRatio -> 1
 , PlotTheme -> "Scientific"
 ]

Earlier

ListPlot[
 Through /@ {Re, Im} /@ data
 , AspectRatio -> 1
 , Frame-> True
 ]

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.