正在加载图片...
SUGI 30 Tutorials Block Chart(BLOCK) Donut Chart(DONUT) block Sales donut Product; SAS/Graph GChart Example SAS/Graph GChart Example BOKO-S 时acmd Notice how SAS chooses a midpoint for each bar,slice,or block.If it is a character variable,it is easy-one for each unique value of the chart variable AND in alphabetical order.BUT,if the chart variable is numeric,SAS computes the midpoints based upon the highest and lowest values of the chart variable then normally divides the range egually over six or seven bars.Generally speaking,if I refer to a bar,the same would generally apply to a pie slice or a block.In the case of our SHOES data there was one observation with a Sales value of almost double the next highest value.But the algorithm used to compute the midpoints is smart enough to account for such outliers and adjust the number of bars accordingly.We'll discuss what the size of the bars mean a little later. We will concentrate on the bar charts to illustrate some of the options,many of which can be applied to all the types. (And because my personal favorite is the VBAR3D.) Several of the options we used for GPLOT can be used as chart options.Which one below changed slightly? titlel c=darkblue h=2.5 f=swissb "SAS/Graph c=darkred h=3.0 f=swissbi "GChart Example"; proc gchart data=sashelp.shoes; vbar3d Product caxis=blue ctext=darkblue autoref lref=2 cref=lime; run; SAS/Graph GChart Example FRECLENCY 330 M M ,S o E u c. 0 E o 0 (a 0- Foduc 99 Block Chart (BLOCK) block Sales ; FREQUENCY BLOCK CHART $0 $200,000 $400,000 $600,000 $800, 000 $1,000, 000 $1,200, 000 Tot al Sal es 288 83 18 2 3 1 Donut Chart (DONUT) donut Product; FREQUENCY of Product Boot 52 Men' s Casual 45 Men' s Dress 50 Sandal 49 Sl i pper 52 Sport Shoe 51 Women' s Casual 45 Women' s Dress 51 Notice how SAS chooses a midpoint for each bar, slice, or block. If it is a character variable, it is easy—one for each unique value of the chart variable AND in alphabetical order. BUT, if the chart variable is numeric, SAS computes the midpoints based upon the highest and lowest values of the chart variable then normally divides the range equally over six or seven bars. Generally speaking, if I refer to a bar, the same would generally apply to a pie slice or a block. In the case of our SHOES data there was one observation with a Sales value of almost double the next highest value. But the algorithm used to compute the midpoints is smart enough to account for such outliers and adjust the number of bars accordingly. We’ll discuss what the size of the bars mean a little later. We will concentrate on the bar charts to illustrate some of the options, many of which can be applied to all the types. (And because my personal favorite is the VBAR3D.) Several of the options we used for GPLOT can be used as chart options. Which one below changed slightly? title1 c=darkblue h=2.5 f=swissb "SAS/Graph " c=darkred h=3.0 f=swissbi "GChart Example"; proc gchart data=sashelp.shoes; vbar3d Product / caxis=blue ctext=darkblue autoref lref=2 cref=lime; run; FREQUENCY 0 10 20 30 40 50 60 Product B o o t M e n ' s C a s u a l M e n ' s D r e s s S a n d a l S l i p p e r S p o r t S h o e W o m e n ' s C a s u a l W o m e n ' s D r e s s SUGI 30 Tutorials
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有