Skip to content
Property Value
Hex Value $85
Categories
Localizations
  • FR: EffDessin

ClrDraw

Overview

Clears all drawn elements from a graph or drawing.

Availability: Token available everywhere.

Syntax

ClrDraw

Location

2nd, draw, DRAW, 1:ClrDraw


Description

The ClrDraw command is useful clearing away something drawn on the graph screen; in particular, you want to do this at the beginning of a program that uses the graph screen, to get rid of anything that might be on it initially. If there are functions, plots, axes, labels, or grid enabled, these will be redrawn even after you ClrDraw. If you don't want these, you should turn them off before the ClrDraw command.

Like many other drawing commands, if you're outside a program and on the graph screen, you can use this command directly, without going to the home screen. Just select ClrDraw from the menu, and the screen will be cleared immediately.

Advanced Uses

Unless the final state of the graph screen is the intended effect of the program, you want to use ClrDraw at the end of the program so that the user doesn't have to deal with it.

Caution: if the graph screen is displayed even before you execute ClrDraw, the user variable Y will be reset to 0. This might be useful as a side effect, but it's more likely to turn out to be a nuisance if you were relying on Y to store something useful. Also, such a wacky effect might get removed in later OS versions1, so it's a gamble relying on it to work for all users.

The RecallPic command does not erase what is previously on the graph screen when recalling a picture. Unless this is what you intend, use ClrDraw to erase the graph screen's old contents before recalling a picture.

Optimization

The ClrDraw command is not the only way to clear the screen. If something changes about the state of the functions or plots plotted on the graph, about the window dimensions, or the axes, grid, and labels, the graph screen will be marked as 'dirty' by the calculator, and will be cleared the next time you display it.

Don't be too confident about relying on this however. For example, if you cleared Y1 before displaying the graph, and Y1 previously contained something, the graph will be redrawn. However, if Y1 never existed, then you haven't changed anything, and the graph will remain.

A lot of people choose their preferred window settings using the following two commands, which sets the window to X= -47..47, Y= -31..31:

ZStandard:ZInteger

Since this actually switches two window settings, at least one will be different from the previous settings, so the next time the graph screen is shown, it will be cleared without a ClrDraw command. There are other friendly window settings that you can use as well.

See Also

Footnotes

1. Fixed on the TI-84+CSE


Source: parts of this page were written by the following TI|BD contributors: Austin 332000, burr, DarkerLine, GoVegan, kg583.

History

Calculator OS Version Description
TI-82 1.0 Added
Authors: Adrien Bertrand