3
$\begingroup$

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!

$\endgroup$
2
  • $\begingroup$ 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? $\endgroup$
    – whuber
    Jan 10, 2013 at 15:00
  • $\begingroup$ Only the first Epilog option setting is used by Show. The rest are ignored. $\endgroup$
    – Michael E2
    Dec 28, 2016 at 0:06

2 Answers 2

6
$\begingroup$

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.

$\endgroup$
2
$\begingroup$

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

$\endgroup$

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