Hi,
x-axis order = (0 to 56 by 7) and y axis order=(0 to 120 by 10). I am displaying box using proc gplot. My graph have two outliers 44,40. but they are not visible. when I change y - axis order to ( 0 to 63 by 7) then I was able to see the outliers. But I have to keep the y aixs order to ( 0 to 56 by 7) , then how do I get outliers visible in my graph. any help would be greatly appreciable.
Code example would be helpful including any AXIS or SYMBOL statements.
Hi,
One of my pet peeves with GPLOT is that it happily excludes data that is outside of the axis range, with only a mere note that data have been excluded from the plot. So:
data a; input x y; cards; 1 50 2 150 3 50 4 150 ; run; symbol i=join; axis1 order=(0 to 100 by 25); proc gplot data=a; plot y*x/vaxis=axis1; run;
Returns a straight horizontal line, with only the log notes to indicate something went wrog: line.
158 proc gplot data=a; 159 plot y*x/vaxis=axis1; 160 run; NOTE: 2 observation(s) outside the axis range for the y * x request.
Seems odd to me that SAS will happily adjust title size, axis labels, etc, automatically, but won't adjust the axis range if you've defined one that is too small. I don't know of a nice solution, other than to specify an axis range which includes all of your data.
--Q.
Here is the code which am using..
Any help would be greatly appreciated..
goptions vsize=16cm hsize=24cm htext=1 device=gif;
options orientation=landscape;
axis1 order=(0 to 56 by 7);
axis2 order=(0 to 120 y 10);
symbol1 value=star i=boxjt mode=include color=blue l=1;
symbol2 value=circle i=boxjt mode=include color=black l=2;
symbol3 value=triangle i=boxjt mode=include color=red l=3;
proc gplot data=xxxx;
plot result*day=drugcode/haxis=axis1 vaxis=axis2;
run;quit;
I think you will need to adjust your axis statement to accomodate the outliers.
You can do this dynamically by reading in the dataset before you run the GPLOT step, and finding the min and max value seen in the data. Then pick a by value that makes sense, and write the min, max and by values to macro variables to be used in your axis statement.
HTH,
--Q.
A_B_C wrote:
axis1 order=(0 to 56 by 7);
proc gplot data=xxxx;plot result*day=drugcode/haxis=axis1 vaxis=axis2;
run;quit;
From online help on the INTERPOL=BOX section of the SYMBOL statement:
Note: If you use the HAXIS= or VAXIS= options in the PLOT statement or the ORDER= option in an AXIS definition to restrict the range of axis values, by default any observations that fall outside the axis range are excluded from the interpolation calculation.
Since you obviously have data outside of the desired axis you are not going to get it to display. You may need to provide a foot note that data exists outside of the display range.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.