내가 테스트하는 SAS/QC에 액세스 할 수없는, proc univariate
보다는 proc capability
입니다,하지만 사용자 가이드는 히스토그램 문에 대해 매우 유사한 구문을 보여줍니다. 바라기를 바꿔 다시 번역 할 수 있습니다.
출력 시스템으로 인해 색상에 문제가있는 것처럼 보입니다. 그래프는 ODS를 통해 전달 될 수 있습니다.이 경우 cfill 옵션이 적용되지 않습니다 (here 및 Traditional Graphics 태그 참조).
proc template;
define style styles.testStyle;
parent = styles.htmlblue;
style GraphDataDefault/
color = green;
end;
run;
ods listing style = styles.testStyle;
proc univariate data = sashelp.cars;
histogram mpg_city;
run;
이 설명 here 일례를 찾을 수있다 :
는
proc template
사용할 수 ODS 출력 히스토그램 바의 색상을 변경한다.
또는 다음과 같이 색상의 더 제어 히스토그램을 만들 proc sgplot
를 사용할 수 있습니다
proc sgplot data = sashelp.cars;
histogram mpg_city/fillattrs = (color = red);
run;
을 히스토그램을 절단의 질문에 관해서. 그것은 히스토그램의 목적을 다소 상실하는 잘못된 분포 이미지를 제공하기 때문에 극단 값을 무시하는 것은 의미가 없습니다. 에서
data tempData;
set sashelp.cars;
tempClass = 1;
run;
proc univariate data = tempData noprint;
class tempClass;
histogram mpg_city/maxnbin = 5 endpoints = 0 to 25 by 5;
run;
을 더미 클래스 tempClass
위에서 생성 한 후 비교 히스토그램이 class
문을 사용하여 요청 : 그건 당신이 해킹의 비트를 요구하고 무엇을 달성 할 수 말했다. maxnbins
은 비교 히스토그램에서만 표시되는 빈의 수를 제한합니다.
다른 옵션은 히스토그램을 만들기 전에 극단적 인 포인트를 제외 (또는 캡핑)하지만 약간 빈번한 빈도 카운트/백분율/막대 높이가됩니다.
data tempData;
set sashelp.cars;
mpg_city = min(mpg_city, 20);
run;
proc univariate data = tempData noprint;
histogram mpg_city/endpoints = 0 to 25 by 5;
run;
이 (NO SAS/QC 또는 데이터로 검증되지 않은) 원래의 질문에 가능한 접근 방식 :
proc capability data = HW2 noprint;
histogram Mvisits/
midpoints = 0 to 300000 by 10000
noplot
outhistogram = histData;
run;
proc sgplot data = histData;
vbar _MIDPT_/
response = _OBSPCT_
fillattrs = (color = blue);
where _MIDPT_ <= 100000;
run;
당신은 당신이 시각화에 관심이 있다면 모두 플롯 쓸모 렌더링하는 매우 큰 값을 가질 일반적인 값 (예 : 히스토그램의 경우 0-3000) 주위의 데이터 분포.어쨌든 SAS 프로그래밍과 관련하여이 질문은 논쟁 거리입니다. – chl
가능한 [SAS 드로잉 막대 그래프] (http://stackoverflow.com/questions/25944250/drawing-histogram-in-sas) –