# Plotting relationship between more than two variables

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.

• 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. – Hubble07 Dec 26 '16 at 8:22
• @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. – John M. Dec 26 '16 at 8:38
• Does your f satisfy a "homogeneity relation"; i.e., a relationship between f[a, b, c] and f[a/b, 1, c]? – J. M. will be back soon Dec 26 '16 at 10:21

## 1 Answer

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"]