{VERSION 3 0 "IBM INTEL NT" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 257 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 12 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 261 "" 1 12 0 0 0 0 0 1 0 0 0 0 0 0 0 }{PSTYLE "Nor mal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 2 2 2 2 2 1 1 1 } 1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Helvetica" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 14 0 0 0 1 2 2 2 2 2 2 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Norma l" -1 258 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 2 2 2 2 2 1 1 1 } 3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "" 0 259 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 260 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "read `a:statvr4.m`; \nwith(plots):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 57 "Elliot Tanis\nS eptember 4, 2000\nFigure 1.3-1 (F1_3-1.mws)" }}}{EXCHG {PARA 0 "> " 0 "top" {MPLTEXT 1 0 34 "read `a:chap01.txt`;\nX := EX1_3_1;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "read `a:HistogramFill.txt`; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 391 "CM := [seq(20.9 + 0.9* k, k = 0 .. 6)]:\nvert := [seq(0.01 + 0.01*j, j = 0 .. 25)]:\nP1 := Hi stogramFill(X, 20.45 .. 26.75, 7):\nP2 := plot([20,0], x = 20 .. 27, y = 0 .. 0.25, xtickmarks=CM, ytickmarks=vert, labels=[``,``]):\ntxt1 \+ := textplot([27,0.009, `x`], font=[TIMES, BOLD, 12]):\ntxt2 := textplo t([20.1, 0.25, `h(x)`], font=[TIMES, BOLD, 12], 'align=RIGHT'):\ndispl ay(\{P1, P2, txt1, txt2\});" }}}{EXCHG {PARA 260 "" 0 "" {TEXT -1 0 " " }{TEXT 259 66 "Figure 1.3-1 Relative frequency histogram of weights \+ of candy bars" }{TEXT 257 0 "" }{TEXT 258 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 260 0 "" }{TEXT 261 76 "The rest of this works heet is not necessary. It does illustrate BarPlotFill." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "nops(X);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 37 "F := ClassFreq(X, 20.45 .. 26.75, 7);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "h := F/40/(9/10); # Defines relativ e frequency histogram" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 256 46 "BarPlotFill puts xtickmarks at the class marks" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 417 "BarPlotFill := proc(L :: list, CM \+ :: list, CW)\n local i, pnts, P1, P2;\n pnts := [seq([[CM[i] - CW/2, 0], [CM[i] - CW/2, L[i]], [CM[i] + CW/2, L[i]], [CM[i] + CW/2, 0]], i = 1 .. nops(CM))]:\nP1 := plots[polygonplot](pnts,color=wheat):\nP2 : = plot([seq([[CM[i] - CW/2,0],[CM[i] - CW/2,h[i]], [CM[i] + CW/2,h[i]] , [CM[i] + CW/2, 0]], i=1..nops(h))], color=black, thickness=2, xtickm arks = CM): \ndisplay(\{P1, P2\}):\nend;" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 67 "h := F/40/(9/10);\nCM := [20.9, 21.8, 22.7, 23.6, 2 4.5, 25.4, 26.3];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 185 "txt1 \+ := textplot([27,0.009, `x`], font=[TIMES, BOLD, 12]):\ntxt2 := textplo t([20.4, 0.26, `h(x)`], font=[TIMES, BOLD, 12], 'align=RIGHT'):\ndispl ay(\{BarPlotFill(h, CM, 0.9), txt1, txt2\});" }}}{EXCHG {PARA 259 "" 0 "" {TEXT -1 66 "Figure 1.3-1 Relative frequency histogram of weights of candy bars" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {MARK "0 0 0" 19 }{VIEWOPTS 1 1 0 1 1 1803 }