I want to show my data in a GANTT diagram. But we do not have SAS/OR so the proc gantt is not possible. I was wondering if it is possible to visualize with sgplot? Anyone has some ideas (code)? My data and thoughts about the plot as specified below:
DATA:
Jobname start_time end_time
01_XXX_YYY 24Oct2016:09:04:04 24Oct2016:09:04:08
01_ZZZ_FFF 24Oct2016:07:34:11 24Oct2016:07:34:18
01_JJJ_KKK 25Feb2016:20:30:17 25Feb2016:40:30:17
PLOT:
01_XXX_YYY -------
01_ZZZ_FFF ---------
01_JJJ_KKK -------
00.00--------------------------------------------------------------------------------------------------------- 23.59
A highlow plot should be able to do this, here are a lot of examples on the highlow plot with code:
http://blogs.sas.com/content/graphicallyspeaking/?s=highlow
Just a matter of setting your x/y axis correctly, and tweaking some of the options.
A highlow plot should be able to do this, here are a lot of examples on the highlow plot with code:
http://blogs.sas.com/content/graphicallyspeaking/?s=highlow
Just a matter of setting your x/y axis correctly, and tweaking some of the options.
This solution functions perfect.Thank you very much.
Yes, you can use SGPLOT. You need just two columns, e.g.:
DATA TEST1;
INPUT Jobname $10. Time datetime19.;
CARDS ;
01_JJJ_KKK 24Oct2016:08:30:17
01_JJJ_KKK 24Oct2016:10:30:17
01_XXX_YYY 24Oct2016:11:04:04
01_XXX_YYY 24Oct2016:13:04:08
01_ZZZ_FFF 24Oct2016:15:34:11
01_ZZZ_FFF 24Oct2016:18:34:18
;
RUN;
DATA TEST2;
set TEST1;
format Time datetime19.;
RUN;
PROC SGPLOT DATA=TEST2;
SERIES X=time Y=Jobname / group=Jobname;
yaxis TYPE=DISCRETE;
RUN;
Note: I changed the timepoints.
You can do basic GANTT plots with the HIGHLOW plot. You can use the SCATTER and TEXT statements to add additional information.
Two good articles to read are:
Hi, you can do something like the following:
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.