options formdlim = '-' nodate; data food2; infile 'food2.txt'; input trt sex $ type $ pref; /* compute the means for each combination of sex and type */ proc sort; by sex type; proc means noprint; by sex type; var pref; output out = means mean = meanpref; run; proc plot; plot meanpref*type = sex; /* plot with type on the X axis */ plot meanpref*sex = type; /* plot with sex on the X axis */ plot meanpref*type = '*' $ sex; /* put labels to the side of the point */ run; /* Hi-res plots, commented out, so not run: proc gplot; plot meanpref*type = sex; /* plot with type on the X axis */ plot meanpref*sex = type; /* plot with sex on the X axis */ run; The $ syntax only works in proc plot. The = syntax works in both. */