Hi Experts,
I need to report data in a histogram format. I used the below code to implement it but, it looks so wired.
Can I get a diagram in a good representable format?
Please have a look at the attachment of (Sample dig) What I'm looking for and What I get a result in SAS.
When I try with gchart I got an error :
ERROR: The PNG driver can not find any fonts. No output will be created.
ERROR: The PNG driver can not find any fonts. No output will be created.
ERROR: Physical file does not exist, C:\WINDOWS\Fonts\sasmono.ttf..
If there is a way kindly correct my code in sgplot itself.
Thanks in Advance!
data Cho_d;
Input Dur$15. Cho_mean;
cards;
Before_Surgery 156.4
6mAfter_Surgery 156.0
1yAfter_Surgery 149.5
run;
PROC SGPLOT DATA = Cho_d;
VBAR Dur / Response = Cho_mean stat=Mean;
label Dur = 'Duration';
label Cho_mean = 'Mean of Total Cholestrol Mg/dl';
TITLE 'Trends in Mean Total Cholesterol levels of 35patients after Bariatric surgery';
RUN;
data Cho_d;
Input Dur$15. Cho_mean;
cards;
Before_Surgery 156.4
6mAfter_Surgery 156.0
1yAfter_Surgery 149.5
;
run;
PROC SGPLOT DATA = Cho_d;
VBAR Dur / Response = Cho_mean datalabel;
yaxis min=80 max=240;
label Dur = 'Duration';
label Cho_mean = 'Mean of Total Cholestrol Mg/dl';
TITLE 'Trends in Mean Total Cholesterol levels of 35patients after Bariatric surgery';
RUN;
@Sathish_jammy wrote:
Hi Experts,
I need to report data in a histogram format. I used the below code to implement it but, it looks so wired.
Can I get a diagram in a good representable format?
Please have a look at the attachment of (Sample dig) What I'm looking for and What I get a result in SAS.
More specific information is needed. What is "wired" about this diagram? What would a "good representable format" look like?
Also, please note that VBAR is not the same as HISTOGRAM. Is that (part of) the problem you are having?
data Cho_d;
Input Dur$15. Cho_mean;
cards;
Before_Surgery 156.4
6mAfter_Surgery 156.0
1yAfter_Surgery 149.5
;
run;
PROC SGPLOT DATA = Cho_d;
VBAR Dur / Response = Cho_mean datalabel;
yaxis min=80 max=240;
label Dur = 'Duration';
label Cho_mean = 'Mean of Total Cholestrol Mg/dl';
TITLE 'Trends in Mean Total Cholesterol levels of 35patients after Bariatric surgery';
RUN;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.