# How to plot two lists in the same graph maintaining the scale of the points?

I need to plot two lists of complex numbers in the same graph to show some results, so I'm using the following lists to do that:

modquaseesc = {-0.8880146641362043 -
0.5279941967067215 I,...}

listfreqgrav = {-1.9122901521705156 -
0.25201677748289864 I, -2.1321454971037404 -
0.27055536524472346 I,...}


And the following code to run a combined graph:

Show[{Transpose@Through@{Re, Im}@listfreqgrav;  ListPlot[coords, PlotStyle -> Directive[PointSize[Medium]],    PlotRange -> All, AxesLabel -> {"Re(\[Omega])", "Im(\[Omega])"},    PlotMarkers -> "*"], Transpose@Through@{Re, Im}@modquaseesc;  ListPlot[coords, PlotStyle -> Directive[PointSize[Medium]],   PlotRange -> Automatic,    AxesLabel -> {"Re(\[Omega])", "Im(\[Omega])"},   PlotMarkers -> "\[SmallCircle]"]}]


This way I get this Graph out of scale:

Compare with the graphs separately, the graphs are different from each other:

And:

Then, How could I generate a Graph with both plots saving the scale of each one?

Graciously! Thank you for supporting since now!

• CaN you give more data points? I am unable to see a difference between the graphs. Commented Oct 17, 2015 at 14:13
• So @Jack, they're very large lists, I just provided a minimal example, but I can affirm that they different each other! :) Commented Oct 17, 2015 at 19:58

I made two fake data sets that were similar but not identical.

modquaseesc = Table[x + I (Exp[-Abs[x]] - 1), {x, -4, 4, 0.4}];
listfreqgrav = Table[x + I (Exp[-Abs[x + 1.]] - 1), {x, -4, 4, 0.4}]


Your code doesn't have coords defined. I am quite certain you meant to make that assignment in your first and third statements inside of Show. If you make those two assignments your code works fine.

However, I have some suggestions.

1. I would recommend using With rather than defining coords inside Show.

2. Once you define the AxesLabel in the first plot, it is not needed in the second plot.

3. If you explicitly assign PlotMarkers as text, PointSize has no effect. Use Style instead.

4. Either set PlotRange in the first plot or (better) set it as a command in Show.

5. No need to provide Show with a list. It is happy with comma separated elements.

With[
{
coords1 = Transpose@Through@{Re, Im}@listfreqgrav,
coords2 = Transpose@Through@{Re, Im}@modquaseesc
},
Show[
ListPlot[coords1,
PlotMarkers -> Style["*", Red, 20],
AxesLabel -> {"Re(ω)", "Im(ω)"}
],
ListPlot[coords2,
PlotMarkers -> Style["∘", Green, 20]
],
PlotRange -> All
]
]


Edit

In order to get PlotLegends put everything inside a single ListPlot and use the labels you desire for the legend.

With[
{
coords1 = Transpose@Through@{Re, Im}@listfreqgrav,
coords2 = Transpose@Through@{Re, Im}@modquaseesc
},
ListPlot[{coords1, coords2},
PlotRange -> All,
PlotMarkers -> {Style["*", Red, 20],
Style["∘", Green, 20]},
AxesLabel -> {"Re(ω)", "Im(ω)"},
PlotLegends -> {"First", "Second"}
]
]


• Hello @Jack, Thanks a lot for you Answer, It worked really well to me! I've got a graph with the two lists together, I appreciate your good will In helping us! Thak you again! :D Commented Oct 17, 2015 at 20:01
• How could I insert legends in this graph? :) Commented Oct 17, 2015 at 20:11
• I've edited the answer to show how to make a legend. You can also use Placed if you want the legends in a different position. Commented Oct 17, 2015 at 22:19