EasyManuals Logo
Home>HP>Calculator>48GII

HP 48GII User Manual

HP 48GII
653 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #112 background imageLoading...
Page #112 background image
2-34 RPL Programming Examples
Programmatic Use of Statistics and Plotting
This section describes a program PIE you can use to draw pie charts. PIE prompts for single variable data,
stores that data in the statistics matrix
Σ
DAT, then draws a labeled pie chart that shows each data point as a
percentage of the total.
Techniques used in PIE
! Programmatic use of PLOT commands. PIE executes XRNG and YRNG to define x- and y-axis display
ranges in user units, and executes ARC and LINE to draw the circle and individual slices.
! Programmatic use of matrices and statistics commands.
! Manipulating graphics objects. PIE recalls PICT to the stack and executes GOR to merge the label for each
slice with the plot.
! FOR…NEXT (definite loop). Each slice is calculated, drawn, and labeled in a definite loop.
! CASE…END structure. To avoid overwriting the circle, each label is offset from the midpoint of the arc of
the slice. The offset for each label depends on the position of the slice in the circle. The CASE…END
structure assigns an offset to the label based on the position of the slice.
! Preserving calculator flag status. Before specifying Radians mode, PIE saves the current flag status in a
local variable, then restores that status at the end of the program.
! Nested local variable structures. At different parts of the process, intermediate results are saved in local
variables for convenient recall as needed.
! Temporary menu for data input.
PIE program listing
Program: Comments:
"!
KOE7!#!*u$mZ!
Recalls the current flag status
and stores it in variable flags.
"!
KB4!
ff!IDE6O<I!\'!h!
f!h!
f!IOE<BKI!OE\!h!
f!h!f!h!
f!I4KBYI!OL=:!hh!
Sets Radians mode.
Defines the input menu: key 1
executes Σ+ to store each data
p
oint in
Σ
DAT, key 3 clears
Σ
DAT, and key 6 continues
p
rogram execution after data
entry.
:M<=5!
Ir)@!w$un)Z!tGpk!
DE6O< !4KBY!
j)Zp$jpZ!qjkmj$odI!
2KLM2:!
Displays the temporary menu.
Prompts for inputs.
represents the newline
character (… ë) after you
enter the program on the stack.
<KBD<!3!3V3!TK=>!
3!ca!PK=>!OEEO4!
Erases the current PICT and
sets plot parameters.

Table of Contents

Other manuals for HP 48GII

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 48GII and is the answer not in the manual?

HP 48GII Specifications

General IconGeneral
Battery typeCR2032
TypeScientific
Form factorPocket
Weight and Dimensions IconWeight and Dimensions
Weight220 g
Dimensions (WxDxH)184 x 87 x 23.5 mm

Related product manuals