Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

i've the following problem:

because it's not possible to plot complex numbers (or is it?) i created my own "function":

    complexPlot[cn_] := 
      Plot[0, {x, -100, 100}, 
           PlotRange -> {-500, 500},
           AspectRatio -> 1,  
           AxesLabel -> {Re, I },
           Epilog -> {Background -> None, PointSize[0.03], 
           Point[{{Re[cn[[1]]], Im[cn[[1]]]}, {Re[cn[[2]]], 
                 Im[cn[[2]]]}, {Re[cn[[3]]], Im[cn[[3]]]}}]}
  ]

with complexPlot, I can plot my complex Numbers, but i want to have one graphic for all my number pairs.

    myPlots = Table[
                    complexPlot[linPolesAll[[n]]],
                    {n, 1, 16}]

    Show[myPlots]

Does not work, it overlays all Plots with the last one (tried it with Show[myPlots[[1]],myPlots[[10]]])

any ideas?

Thanks!

share|improve this question
    
Show is supposed to overlay all the plots. (If this is not what you want, look at Grid, GraphicsGrid, TableForm, etc.) Is there some problem with how the overlay is occurring? –  whuber Jan 10 '13 at 15:00
add comment

2 Answers 2

Why not just use

complexPlot[pts_]:=ListPlot[{Re@#,Im@#}&/@pts]

as your customly defined plot function? The advantage is that this version shows the appropriate region, not the hardcoded one you have in your version.

share|improve this answer
add comment

In @Nasser's answer, one could directly use the built-in function RandomComplex:

poles = RandomComplex[{-100 - 100 I, 100 + 100 I}, {12, 3}];

And then, since you want to plot complex numbers and, except for graphics, Mathematica "prefers" complex number to reals, it seems silly to have to program complex things in terms of real and imaginary parts. This is where David Park's Presentations add-on ( http://home.comcast.net/~djmpark/DrawGraphicsPage.html) can do the work for you:

Draw2D[{PointSize[Large], Red, ComplexPoint /@ poles},
       Axes -> True, AxesLabel -> {Re, Im}, BaseStyle -> 12, ImageSize -> 400]

Mathematica graphics

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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