Library: | graphic |
See also: | grbar grbox grhist |
Quantlet: | grstar | |
Description: | Generates a star diagram. |
Usage: | bp = grstar (x {, col {, option {, minmax}}}) | |
Input: | ||
x | n x p matrix | |
col | color | |
option | 2 x 1 vector | |
minmax | p x 2 vector | |
Output: | ||
bp | composed graphical object |
; loads the library graphic library("graphic") ; reads the swiss banknote data(200x6) x = read("bank2") x = x[71:130] ; computes a star diagram of x bp = grstar(x) ; creates a display d = createdisplay(1,1) ; shows the star diagram show(d, 1, 1, bp)
shows a star diagram of 30 forged and 30 genuine banknotes the shape is different
; loads the library graphic library("graphic") ; reads the swiss banknote data(200x6) x = read("bank2") x = x[71:130, 4:6] ind = 1:rows(x) col = grc.col.green-grc.col.red col = grc.col.red+col.*(ind[,1]<=mean(ind[,1])) ; computes a star diagram of x bp = grstar(x, col) ; creates a display d = createdisplay(1,1) ; shows the star diagram show(d, 1, 1, bp)
shows a star diagram of 30 forged and 30 genuine banknotes the shape ise very different. The color (green/red) indicates the group membership