Use Legacy Graphics Internal Code

DESCRIPTION:

Sets a flag regarding whether the internal graphics code as of S-PLUS 7 should be used, or the rewritten graphics code introduced in S-PLUS 8.

USAGE:

use.legacy.graphics(use=NULL)

OPTIONAL ARGUMENTS:

use
If T, the old internal code is called by the S graphics functions. If F, the new internal code is called. If NULL, the setting is not changed.

VALUE:

If use is NULL the current setting of this flag is returned. Otherwise, the setting before the value was changed is returned.

SIDE EFFECTS:

Changes a flag that the S graphics functions check to determine whether the new or old internal code should be called.

DETAILS:

In S-PLUS 8 much of the low-level Ratfor and S version 2 interface code was rewritten in C, and enhancements made in a variety of areas. Enhancements include: a) global palette and image palette; b) separate col arguments for different graph elements such as col.main; c) ability to specify colors as a string "red" or "#FF0000"; d) additional vectorized parameters such as col in plot.

One known change in default behavior is that previously this command would create a plot in which all elements are blue: plot(1:10,col=2). Now only the points are blue. While this is the desired behavior in most cases, users may conceivably want to revert to the old behavior.

As this was a substantial code change, other currently unknown inconsistencies may be present. Hence a setting was added that controls whether the S code calls the new C code, or calls the same code as was called in previous releases. It is anticipated that users will only take advantage of this if they experience problems with the new graphics code, and that this setting will become obsolete as any problems are identified and fixed.

This is an application-level setting that cannot be changed while devices exist. If any devices are open and use is specified, the function will stop with an error message.

Note that a separate setting is available for users interested in taking advantage of the new code while still using device-specific palettes. See the function use.device.palette for details.

SEE ALSO:

.

EXAMPLES:

# Set the flag to use the older graphics code
use.legacy.graphics(T)