Program:

Comments:

 

 

 

 

 

 

prcnts n GET

Gets the nth value from the

 

 

1 RND

percentage matrix, rounds it to one

 

 

→STR "%" +

decimal place, and converts it to a

 

 

 

string with “%” appended.

 

 

1 →GROB

Converts the string to a graphics

 

 

 

object.

 

 

GOR DUP PICT STO

Adds the label to the plot and stores

 

 

 

the new plot.

 

 

→LCD

Displays the updated plot.

 

 

NEXT

Ends the loop structure.

 

 

{ } PVIEW

Displays the finished plot.

 

 

»

 

 

 

»

 

 

 

flags STOF

Restores the original flag status.

 

 

» 0 MENU

Restores the previous menu.

 

 

 

(You must first press to clear

 

 

 

the plot.)

 

 

»

 

 

 

 

 

 

 

`OPIE K

Stores the program in PIE.

 

 

 

 

 

 

Checksum: # 16631d

 

Bytes:

737

 

 

Example: The inventory at Fruit of the Vroom, a drive-in fruit stand, includes 983 oranges, 416 apples, and 85 bananas. Draw a pie chart to show each fruit’s percentage of total inventory.

J%PIE%

Clear the current statistics data. (The prompt is removed from the display.) Key in the new data and draw the pie chart.

CLEAR

983%SLICE%

416%SLICE%

85%SLICE%

%DRAW%

Press to return to the stack display.

2-36 RPL Programming Examples