@BrianOwens wrote:
I am going to try your first suggestion. I tried creating sperate plot statements but it gives me separate outputs but I want it all on one.
ANY time you get output other than desired include the entire text of the submitted code. Best is to copy from the LOG with any notes or messages, open a text box on the forum with the </> icon above the message box and paste the text.
The example data you show does give me clue why you might have problems: The X and Y AXIS variables would have to be the same. The data looks suspiciously like typical spreadsheet thinking which does not work well with SAS (or most other data systems).
Consider: This builds a data set from that text. Note use of 4 digit years. Use of 2-digit years is bad juju and can lead to a variety of unexpected oddness. Then reshapes the data to a form more suited to use for almost any purpose in SAS and Plots that data. I used a different format in the plot and depending on the display size of the graph may work nicer than what yours defaulted to.
data have;
infile datalines dlm=',';
input Unit $ Start1 :date11. End1 :date11. Phase1:$15.
Start2 :date11. End2 :date11. Phase2:$15.
Start3 :date11. End3 :date11. Phase3:$15.
Start4 :date11. End4 :date11. Phase4:$15.
;
format Start: End: date11.;
datalines;
Unit 1,1-Oct-2022,31-Mar-2023,Committed,1-Apr-2023,30-Sep-2023,Reset,1-Oct-2023,31-Mar-2024,Prepare,1-Apr-2024,30-Sep-2024,Ready
Unit 2,1-Oct-2022,31-Mar-2023,Committed,1-Apr-2023,30-Sep-2023,Reset,1-Oct-2023,31-Mar-2024,Prepare,1-Apr-2024,30-Sep-2024,Ready
Unit 3,1-Apr-2023,30-Sep-2023,Committed,1-Oct-2023,30-Mar-2024,Reset,1-Apr-2024,30-Sep-2024,Prepare,1-Oct-2024,30-Mar-2025,Ready
Unit 4,1-Apr-2023,30-Sep-2023,Committed,1-Oct-2023,30-Mar-2024,Reset,1-Apr-2024,30-Sep-2024,Prepare,1-Oct-2024,30-Mar-2025,Ready
Unit 5,1-Oct-2023,31-Mar-2024,Committed,1-Apr-2024,30-Sep-2024,Reset,1-Oct-2024,30-Mar-2025,Prepare,1-Apr-2025,30-Sep-2025,Ready
Unit 6,1-Oct-2023,31-Mar-2024,Committed,1-Apr-2024,30-Sep-2024,Reset,1-Oct-2024,30-Mar-2025,Prepare,1-Apr-2025,30-Sep-2025,Ready
Unit 7,1-Apr-2024,30-Sep-2024,Committed,1-Oct-2024,31-Mar-2025,Reset,1-Apr-2025,30-Sep-2025,Prepare,1-Oct-2025,30-Mar-2026,Ready
Unit 8,1-Apr-2024,30-Sep-2024,Committed,1-Oct-2024,31-Mar-2025,Reset,1-Apr-2025,30-Sep-2025,Prepare,1-Oct-2025,30-Mar-2026,Ready
Unit 9,1-Oct-2024,30-Mar-2025,Committed,1-Apr-2025,30-Sep-2025,Reset,1-Oct-2025,31-Mar-2026,Prepare,1-Apr-2026,30-Sep-2026,Ready
Unit 10,1-Oct-2024,31-Mar-2025,Committed,1-Apr-2025,30-Sep-2025,Reset,1-Oct-2025,31-Mar-2026,Prepare,1-Apr-2026,30-Sep-2026,Ready
;
data toplot;
set have;
array s (*) start: ;
array e (*) end: ;
array p (*) phase: ;
do i= 1 to dim(s);
start = s[i];
end = e[i];
phase = p[i];
output;
end;
format start end date11.;
keep unit start end phase;
run;
proc sgplot data=toplot;
title 'Wing Calander';
highlow y=UNIT low=START HIGH=END / type=bar group=PHASE
groupdisplay=overlay barwidth=0.5
name='a';
yaxis reverse display=(nolabel) grid;
/* xaxis display=(nolabel) min='01oct2022'd max='30sep2026'd grid;*/
xaxis display=(nolabel) values=('01oct2022'd to '01OCT2026'd by quarter)
grid valuesformat=yymon.
;
keylegend 'a' / location=inside position=topright across=1;
run; title;
... View more