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;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.