Suppose I have a function f[a,b,c] and would like to plot the values of f[a,b,c] for a range of $\frac{a}{b}$ and a range of $c$. That is, I'd like to see the change in the function over various $\frac{a}{b}$ for each value of $c$. Does anyone know how this could be done?

Any help appreciated.

  • $\begingroup$ Can f[a,b,c] = a+b+c. If yes then you would have to specify either a or b right. Or is the function only made of ratios of a/b and c. $\endgroup$
    – Hubble07
    Dec 26, 2016 at 8:22
  • $\begingroup$ @Hubble07 Yes, it can be expressed as $a + b + c$. However I'd like to constrain the ratio of $a$ and $b$ though, without setting either value. $\endgroup$
    – John M.
    Dec 26, 2016 at 8:38
  • $\begingroup$ Does your f satisfy a "homogeneity relation"; i.e., a relationship between f[a, b, c] and f[a/b, 1, c]? $\endgroup$ Dec 26, 2016 at 10:21

1 Answer 1


Let your function be simply a+b+c then you can do the following:

f[d_, c_] := Module[{a = 1, b},
b = a/d;
a + b + c]

Plot[{f[d, 1], f[d, 2]}, {d, 1, 5}, PlotRange -> Full, Frame -> True, 
PlotLegends -> "Expressions"]

enter image description here


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.