1
$\begingroup$
f[k_] = {{-0.001 - 2 I k, 1, -0.001, -0.501}, {0.001, -0.5 - I k, 0.001, 0.001},
         {-0.001, -0.501, -0.001 + 2 I k, 1.}, {0.001, 0.001, 0.001, -0.5 + I k}};

x[k_] = Re[Eigenvalues[f[k]][[3]]];
Plot[x[k], {k, -1, 1}]
ParametricPlot[{k, x[k]}, {k, -1, 1}]

Why does Plot give a result, but ParametricPlot does not? Both functions are supposed to give the graph of the function x[k]. I don't understand why ParametricPlot returns nothing. Please help me to get the difference.

$\endgroup$
  • $\begingroup$ It's because the aspectratio is bad in parametricplot $\endgroup$ – Coolwater Jan 28 '14 at 20:32
  • 1
    $\begingroup$ Related: mathematica.stackexchange.com/q/20854/57 $\endgroup$ – Sjoerd C. de Vries Jan 28 '14 at 20:47
  • $\begingroup$ @Sjoerd It seems to me this may be considered a duplicate. Any reason you did not vote to close it as such? $\endgroup$ – Mr.Wizard Jan 29 '14 at 0:04
  • $\begingroup$ @Mr.Wizard I wasn't near my PC, so I couldn't check what "Why does Plot give a result, but ParametricPlot does not?" entailed. I assumed it would be like the linked question, but wasn't sure. Will vote to close now. $\endgroup$ – Sjoerd C. de Vries Jan 29 '14 at 17:56
3
$\begingroup$
Plot[x[k], {k, -1, 1}]

Mathematica graphics

For the ParametricPlot you need to alter the Options to reproduce the plot.

ParametricPlot[{k, x[k]}, {k, -1, 1}, AspectRatio -> 1/2]

You can find out the default AspectRatio for Plot by doing:

Options[Plot, AspectRatio]

{AspectRatio -> 1/GoldenRatio}

Mathematica graphics

OR more elegantly as suggested by Belisarius

p = Plot[x[k], {k, -1, 1}];
ParametricPlot[{k, x[k]}, {k, -1, 1}, Evaluate[AbsoluteOptions[p]]]
$\endgroup$
  • $\begingroup$ p = Plot[x[k], {k, -1, 1}]; ParametricPlot[{k, x[k]}, {k, -1, 1}, Evaluate[AbsoluteOptions[p]]] $\endgroup$ – Dr. belisarius Jan 28 '14 at 20:35
  • $\begingroup$ @Belisarius. Nice $\endgroup$ – RunnyKine Jan 28 '14 at 20:37