[英]How to fit a logarithmic line to multiple series in sgplot in SAS?
我在sas中有當前宏
%macro Plot_Rolling_Avgs(id, ylabel_, xlabel_, title_, avg_1, avg_2, avg_3, avg_4, avg_5, avg_6);
proc Sgplot data=VA_PUR_Cur_Cur_Roll;
SERIES X = &id Y = &avg_1;
SERIES X = &id Y = &avg_2;
SERIES X = &id Y = &avg_3;
SERIES X = &id Y = &avg_4;
SERIES X = &id Y = &avg_5;
SERIES X = &id Y = &avg_6;
YAXIS LABEL = &ylabel_;
XAXIS LABEL = &xlabel_;
Title &title_;
keylegend / location=inside position=topleft across=1;
ods graphics on /
width=15.0in
height=5.0in;
run;
quit;
%mend Plot_Rolling_Avgs;
我正在嘗試為每個時間序列的圖形添加對數平均線。 我試圖避免創建另一列對數平均值並繪制它們,而是希望使用內置函數。
有人對這個有經驗么?
從9.4版開始,SAS內置了兩個趨勢線選項:
有關更多信息,請參見SGPLOT的文檔 。 不幸的是,我不相信有什么可以像您在此處描述的那樣適用於多個系列。
如果您從SGPLOT轉到GTL(圖形模板語言),則可能可以做一些事情; 在那里,您可以在制圖過程本身內部進行一些計算。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.