1
$\begingroup$

How can I plot f(x) on {y axis} with respect to 1/x on {x axis}?

$\endgroup$
3
$\begingroup$

Yet another way:

 ParametricPlot[{1/x,f[x]},{x,x0,x1}, AspectRatio->1/GoldenRatio]
$\endgroup$
1
$\begingroup$
Plot[Sin[x], {x, Pi, 3 Pi}]
Plot[Evaluate[Sin[x] /. {x -> 1/x}], {x, 1/(3 Pi), 1/Pi}]
$\endgroup$
1
$\begingroup$

I guess that you are talking about the composite function $f(1/x)$.

Is this what you want?

Plot[Sin[x], {x, Pi, 3 Pi}]

enter image description here

Plot[Sin[1/x], {x, 1/(3 Pi), 1/ Pi}]

enter image description here

Plot[{Sin[x], Sin[1/x]}, {x, Pi, 3 Pi}]

enter image description here

$\endgroup$
1
$\begingroup$

Perhaps you can use the ScalingFunctions option, although the ticks also need to be modified to get a decent output:

Plot[
    Sin[x],
    {x, Pi, 3Pi},
    ScalingFunctions->{"Reciprocal", None},
    PlotRange->All,
    Ticks->{Table[{n,n}, {n, 4, 10}],Automatic}
]

enter image description here

$\endgroup$
0
$\begingroup$

To plot y=1/x in Mathematica use the code as below Plot[1/x,{x,-4,4}] you can use x = -3,3 or -1,1 or whatever you want. it solve your problem.

$\endgroup$

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.