2
$\begingroup$

I am trying to plot a specified contour of my function of two variables.

I call ContourPlot with my function as follows:

MyFunc[f_, x_, y_] := 
  toplot = f;
  k = x*y;
  ContourPlot[{toplot == k}, {x1, 0, 100}, {x2, 0, 100}]

I need to set the domain dynamically, because when I have high value of k, the contour could be outside the statically specified domain.

How can I solve this issue?

$\endgroup$
  • $\begingroup$ what is x,y and x1,x2 ? are they related? Are you looking for something like this Manipulate[ ContourPlot[{x y == k}, {x, 0, 100}, {y, 0, 100}], {k, 0, 1000}] $\endgroup$ – Sumit May 7 '16 at 11:22
  • $\begingroup$ but: 1) I need to do this without using Manipulate and 2) I need to plot toplot not xy $\endgroup$ – Motosega May 7 '16 at 13:00
  • $\begingroup$ Why can't you use Manipulate? $\endgroup$ – m_goldberg May 7 '16 at 13:37
  • $\begingroup$ Then try ContourPlot3D like toplot = f; k = x y; ContourPlot3D[ toplot == k, {x, 0, 10}, {y, 0, 10}, {f, 0, 100}] $\endgroup$ – Sumit May 7 '16 at 13:55
  • $\begingroup$ I can't use manipulate because i've fixed value and it isn't my goal show all possible value of k. And i need also 2D Plot. So, ContourPlot3D is not solution. $\endgroup$ – Motosega May 7 '16 at 14:03

Browse other questions tagged or ask your own question.