Group Abstract Group Abstract

Message Boards Message Boards

Plot a two variable function but with another variable in the x-axis

Posted 11 years ago
3 Replies

pts = Table[ i * {xmax, ymax}, {i, 0, 1, .01}]

POSTED BY: Frank Kampas

I think ListPlot is the way to go, since you'll probably have multiple values of f[ x, y] for the same value of sqrt(x^2 + y^2 ).

f[{x_, y_}] = Sin[x y];

mod[{x_, y_}] = Sqrt[x^2 + y^2];

 pts = Flatten[Table[{x, y}, {x, 0, 10, .1}, {y, 0, 10, .1}], 1];

fpts = f /@ pts; modpts = mod /@ pts;

ListPlot[Transpose[{modpts, fpts}]]
POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard