2
$\begingroup$
a[x_,y_]:=x^3+y^2;
b[x_,y_]:=x^2+y^3;

I want to plot a[x,y] in x axis and b[x,y] in y axis for different values of x and y say, we fix y=1 and x goes from 1 to 10.

$\endgroup$
1
  • $\begingroup$ a = #1^3 + #2^2&; shorter : ) $\endgroup$ Commented Jun 23, 2022 at 13:01

2 Answers 2

5
$\begingroup$

Try ParametricPlot

a[x_, y_] := x^3 + y^2;
b[x_, y_] := x^2 + y^3;
ParametricPlot[{a[x, 1], b[x, 1]}, {x, 1, 10}, AspectRatio -> 1]

enter image description here

$\endgroup$
2
  • $\begingroup$ Haha almost at the same time, I think I beat you by a few seconds! (+1) $\endgroup$
    – rhermans
    Commented Jun 23, 2022 at 10:54
  • 1
    $\begingroup$ Congratulation ;-) $\endgroup$ Commented Jun 23, 2022 at 10:54
5
$\begingroup$

You can use With to give a local value for y and ParametricPlot for the plot.

a[x_,y_]:=x^3+y^2;
b[x_,y_]:=x^2+y^3;

With[
   {y=1},
   ParametricPlot[
      { a[x,y], b[x,y] }
      , {x, 1, 10}
      , PlotTheme -> "Scientific"
      , AspectRatio -> 1
   ]
]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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