ParametricPlot[ {1, Tan[t]}, {t, -Pi/3, Pi/3}]
ParametricPlot[ Sec[t] {Cos[t], Sin[t]}, {t, -Pi/3, Pi/3}]

The second parametrization does not plot like the first, how to make it plot without changing its form?

  • 1
    $\begingroup$ use Evaluate in the second line:, i.e, ParametricPlot[Evaluate[Sec[t] {Cos[t], Sin[t]}], {t, -Pi/3, Pi/3}]. Or Evaluated->True, i.e., ParametricPlot[Sec[t] {Cos[t], Sin[t]}, {t, -Pi/3, Pi/3}, Evaluated -> True] $\endgroup$
    – kglr
    Feb 27 '15 at 4:55
  • 1
    $\begingroup$ Or include PlotRange -> {{-.1, 2.1}, {-1.9, 1.9}} $\endgroup$
    – Bob Hanlon
    Feb 27 '15 at 4:59
  • $\begingroup$ Thanks. Expected the plot defaults would automatically handle simple cases. $\endgroup$
    – Narasimham
    Feb 27 '15 at 5:25

A slight variant on Bob Hanlon's comment -- just for the record.

 ParametricPlot[Sec[t] {Cos[t], Sin[t]}, {t, -Pi/3, Pi/3},
   PlotRange -> {{0, 2}, Automatic}]


  • $\begingroup$ ParametricPlot[ {1, Tan[t]}, {t, -Pi/3, Pi/3}] when plots directly ok , why do the rest need extra Range specification? $\endgroup$
    – Narasimham
    Feb 27 '15 at 6:06
  • $\begingroup$ @Narasimham. The heuristics Mathematica uses for choosing plot range when none is specified are unknown to me. But giving the option PlotRange to manually override the automatic choice will always solve the kind of problem you have encountered. $\endgroup$
    – m_goldberg
    Feb 27 '15 at 6:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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