Error, (in plot) cannot determine plotting variable - Maple Programming Help

Home : Support : Online Help : System : Error Message Guide : cannotdetermineplottingvariable

Error, (in plot) cannot determine plotting variable

 Description This error occurs when the plot command does not have enough information to determine the independent variable to be plotted. You may have tried to plot two functions but they are functions of different variables, or you may have left some unknown variable in your plotting expressions besides the plotting variable.

Examples

Example 1

In this example, we want to plot two functions on the same graph.  However, the first is a function of $t$ and the second is a function of $x$.

 > $\mathrm{plot}\left(\left[\mathrm{sin}\left(t\right),x-\frac{1}{6}{x}^{3}\right]\right)$

Solution

To fix the problem, use the same variable in both functions.  (It can be x or t.)

 > $\mathrm{plot}\left(\left[\mathrm{sin}\left(x\right),x-\frac{1}{6}{x}^{3}\right]\right)$

Example 2

 >
 ${\mathrm{g1}}{≔}{{x}}^{{2}}{-}{20}{}{x}{-}{40}$
 ${\mathrm{g1}}{≔}{{x}}^{{2}}{-}{10}{}{x}{-}{40}$ (2.1)
 > $\mathrm{plot}\left(\left\{\mathrm{g1},\mathrm{g2}\right\}\right)$

Solution

The functions g2 has not been defined.  (Note the typo in the first line, where g1 is assigned twice.) To fix, change the second g1 to g2.

 >
 ${\mathrm{g1}}{≔}{{x}}^{{2}}{-}{20}{}{x}{-}{40}$
 ${\mathrm{g2}}{≔}{{x}}^{{2}}{-}{10}{}{x}{-}{40}$ (2.2)
 > $\mathrm{plot}\left(\left\{\mathrm{g1},\mathrm{g2}\right\}\right)$