1
我想創建一個使用proc glpot的陰謀。我必須調整y軸(axis2)的範圍以適合我感興趣的值的範圍(使用order命令來實現這一點)。問題是,如果我爲plot2指定了noaxis選項,那麼迴歸線不再適合我的觀點。如果我使用相同的水平軸和垂直軸(分別爲axis1和axis2)作爲plot2的選項,那麼最後我會在圖的右側結束另一個軸,如下圖所示。 SAS proc gplot:調整軸範圍後,迴歸線沒有調整點
我該如何解決這個問題,以便我可以在不添加其他座標軸的情況下正確匹配我的迴歸直線?
/* Set the graphics environment */
goptions reset=all cback=white border htitle=12pt htext=10pt;
/* Define the title */
title1 "001";
/* Define the axis characteristics */
axis1 label=("Age");
axis2 label=(angle=90 "Value") minor=(n=4) order= 0 to 1 by .1;
/* Define the symbol characteristics for the scatter plot groups */
symbol1 interpol=none value=dot color=R;
symbol2 interpol=none value=dot color=O;
symbol3 interpol=none value=dot color=Y;
symbol4 interpol=none value=dot color=G;
symbol5 interpol=none value=dot color=B;
symbol6 interpol=none value=dot color=P;
symbol7 interpol=none value=dot color=BL;
/* Define the symbol characteristics for the regression line */
symbol8 interpol=rlclm90 value=none color=BL W=1;
/* Define the legend options */
legend1 frame label=none repeat=1
value=("1" "2" "3" "4" "5" "6" "7");
proc gplot data=test;
plot value*age=missile/haxis=axis1
vaxis=axis2
legend=legend1
vref=.1
vref=.7
lvref=3
cvref=R;
plot2 value*age/haxis=axis1 vaxis=axis2;
run;
quit;