I have a set of eigenvalue triplets from some 3x3 matrices and I would like to plot them on the complex plane. My goal is to plot them such that each triplet has a unique color that identifies the points with one another. I believe that Mathematica does this automatically if the points are separated in such a way that


however, I have 125 triplets that I would like to plot -- so it seems Mathematica starts to repeat colors after a handful of them. In theory, I would like to just extend what ComplexListPlot already does, just to a larger number of points.

Below is some sample code where I have provided a list of five eigenvalue triplets, however as mentioned I have 125 in the actual problem. So, my first thought was to attempt to do some sort of color gradient for the points. When I tried this with the below code, it seems to apply the color gradient to the location of the point on the plot instead of the triplet of points.

ComplexListPlot[eigsol, PlotRange -> {{-0.2, 0.2}, {-0.1, 0.1}}, 
 AxesOrigin -> {0, 0}, Frame -> True, 
 FrameTicks -> {{Automatic, None}, {Automatic, None}}, 
 ColorFunction -> "DarkRainbow"]

enter image description here

This produces the attached result, which is clearly not what I am looking for. So, is there any way to color a large list of triplets in such a way that it is easy to identify the points with one another?

Example Data:

eigsol = {{-0.150398 + 0. I, 0.0607001 + 0.0346517 I, 
  0.0607001 - 0.0346517 I}, {-0.150368 + 0. I, 0.056947 + 0.0321297 I,
   0.056947 - 0.0321297 I}, {-0.150341 + 0. I, 
  0.0537149 + 0.0294061 I, 
  0.0537149 - 0.0294061 I}, {-0.150314 + 0. I, 0.0508797 + 0.026467 I,
   0.0508797 - 0.026467 I}, {-0.15029 + 0. I, 0.0483519 + 0.0232498 I,
   0.0483519 - 0.0232498 I}}

I would welcome anyway to color them uniquely, it doesn't need to be a gradient as I tried (and failed) to do. Thanks so much!


1 Answer 1


You can use PlotStyle to color each set:

    PlotStyle -> ColorData["Rainbow"]/@Subdivide[Length[eigsol]-1]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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