a little boy
05-15-2009, 11:46 PM
Hi everyone,
I have another question on plotting the grouped data separately. I used the proc plot and asked SAS to plot two separate plots for group A and B respectively. However when I execute the code below, there is only one group A shown in the plot. I wonder where the group B is ?
Thank you very much !!
data prob23;
length group $ 1;
input x y z group $;
datalines;
2 4 6 A
3 3 3 B
1 3 7 A
7 5 3 B
1 1 5 B
2 2 4 A
5 5 6 A
;
proc plot data = prob23;
plot y*x/vaxis = 0 to 5 by 1;
run;
proc plot data = prob23;
by group;
plot y*x = group/vaxis = 0 to 5 by 1;
run;
I have another question on plotting the grouped data separately. I used the proc plot and asked SAS to plot two separate plots for group A and B respectively. However when I execute the code below, there is only one group A shown in the plot. I wonder where the group B is ?
Thank you very much !!
data prob23;
length group $ 1;
input x y z group $;
datalines;
2 4 6 A
3 3 3 B
1 3 7 A
7 5 3 B
1 1 5 B
2 2 4 A
5 5 6 A
;
proc plot data = prob23;
plot y*x/vaxis = 0 to 5 by 1;
run;
proc plot data = prob23;
by group;
plot y*x = group/vaxis = 0 to 5 by 1;
run;