1
$\begingroup$

I've got a question quite similar to No 18163:Problem with high parameter values in ParametricPlot, but the solution of that problem did not work for me. So I hope you may have another tip.

I want to plot an equation similar (just a bit more difficult) then the following, the parameter and data range of concern is also similar:

$\omega = 2 c \pi / \lambda$,

where $c$ is the speed of light.

Now, the other function is a bit more tricky, therefore I want to use ParametricPlot and not Plot. My problem however is that it does not display the x-axis (or it might be so small I don't see it) when I use the correct value for c. It seems to be a problem with the large values, as everything is OK if I set c = 2 or c = 10 instead.

The code I used is:

1)

ParametricPlot[{(2 π)/λ, (2 π)/λ*1000}, {λ, 300, 1000}]

2)

ParametricPlot[{(2 π)/λ, (2 π])/λ*1000}, {λ, 300, 1000}, 
  PlotRange -> {{0.010, 0.02}, {10^15, 10^16}}, 
  MaxRecursion -> 15,
  Evaluated -> True]

I tried to apply a workaround, creating a list to Map over the range $\lambda$ = 300 .. 1000 and then using ListPlot. This would work; however, it's not so good for my full problem.

$\endgroup$
2
  • 3
    $\begingroup$ Have you tried AspectRatio? $\endgroup$ Commented Mar 7, 2013 at 22:46
  • 1
    $\begingroup$ @Xerxes That's a great solution. By default ParametricPlot tries to keep common scales on all axes; when the coordinates differ radically in size, that default needs to be overridden. $\endgroup$ Commented Mar 7, 2013 at 23:04

1 Answer 1

3
$\begingroup$

Following the comments of Xerxes and whuber:

The default value for AspectRatio in ParametricPlot is:

OptionValue[ParametricPlot, AspectRatio]
(* Automatic *).

This differs from the one for Plot:

OptionValue[Plot, AspectRatio]
(* 1/GoldenRatio *)

Usually, this is a good choice as parametric plots usually have identical distances along the axes (this is what Automatic does). In your case, there is a huge difference between the two axes:

ParametricPlot[{(2 π)/λ, (2 π)/λ*1000}, {\λ, 300, 1000}]

Mathematica graphics

The solution is to set AspectRatio to a value that looks good, like the value for Plot:

ParametricPlot[{(2 π)/λ, (2 π)/λ*1000}, {λ, 300, 1000}, AspectRatio -> 1/GoldenRatio]

Mathematica graphics

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.