Error: unknown or bad optional argument (there are several versions of this error message)

The plotting commands have many options, which are all specified in the form of equations. An error occurs if an option is not given as an equation, if the option specified is not one of the possible options for the command (e.g. it may be misspelled), or if the value for the option is not of the correct type. See the help page plot[options] or plot3d[options] for the correct form for each option.

Note in particular that although the values of the options can in many cases be written either all in lowercase or all in uppercase ( axes=frame or axes=FRAME ), the option name should always be lowercase.

The values for the title option must be a string, and for labels you need a list of strings. In order to put a mathematical expression in the title or an axis label, you need to convert it to a string. When you do this, the result is written in Maple input format rather than being typeset, e.g. [Maple Math] becomes Int(x^2,x) . However, it is possible to do some tricks with textplot and the SYMBOL font: see the Maple Advisor help page Greek letters and other symbols in plots .

These errors can also occur if you have used the name of the option or a name which is the value of the option as a variable and assigned it a value. This is possible because these names are not protected. When the arguments to the plot command are evaluated, the value is substituted for the name, resulting in the error. If you must use these names as variables, you can use quotes to prevent them from being evaluated.


Option not given as an equation:

> plot3d(x+y,x=0..1,y=0..1,title[sample]);

Error, (in plot3d) bad optional argument, title[sample]

Options must not be capitalized:

> plot3d(x+y,x=0..1,y=0..1,TITLE=`sample`);

Error, (in plot3d/options3d) unknown or bad optional argument, TITLE = sample

Option is of the wrong type (it should be a string, not a list):

> plot3d(x+y,x=0..1,y=0..1,title=[sample]);

Error, (in plot3d/options3d) unknown or bad optional argument, title = [sample]

Option or option value assigned a value:

> axes:= `foo`:

Error, (in plot/options2d) unknown or bad argument, foo = box

> foo:= 1:

Error, (in plot/options2d) unknown or bad argument, title = 1

Quotes delay evaluation, so the following works:

> plot(x,x=0..1,title='foo','axes'=box);

Math expression in a title:

> f:=sin(1/x):

Error, (in plot/options2d) unknown or bad argument, title = sin(1/x)

Make the math expression into a string:

> plot(f,x=0..1,title=convert(f,string));

See also: plot[options] , plot3d[options] , Unevaluated expressions

Maple Advisor Database R. Israel, 1997