Thank you very much Ksharp! I will try to work out that code with my data.
If you don't mind, I have a another question:
I had to do some formatting in order to reorder the levels of the var 'Harvest' to (11,12,1,2,3,5) but the issue I am having is that even though the order in the graph is the order I want, the label is showing in the graph is 'tag' instead of 'Harvest'. How do I change the label?
I would very much appreciate it if you could let me know!
proc sort data=one out=one; by Harvest; run;
data one22;
set one;
where Variety in('464918_99','Hass');
if (Harvest eq 11) then tag=1;
else if (Harvest eq 12) then tag=2;
else if (Harvest eq 1) then tag=3;
else if (Harvest eq 2) then tag=4;
else if (Harvest eq 3) then tag=5;
else if (Harvest eq 5) then tag=6;
else tag=.;
run;
proc format;
value Harvest 1="11"
2="12"
3="1"
4="2"
5="3"
6="5";
run;
title "DTR: 464918_99 vs Hass by Season and Harvest month";
proc sgpanel data=one22;
where Season in(2021, 2022, 2024) and Harvest in(11,12,1,2,3,5) and Variety in('464918_99','Hass');
panelby Season/rows=1 onepanel ;
format tag Harvest.;
vline tag /response=DTR group=Variety markers markerattrs=(symbol=circlefilled) stat=mean ;
rowaxis values=(0 to 12 by 2) ;
run;
... View more