BookmarkSubscribeRSS Feed
Hagay
SAS Employee

לעיתים קרובות מאוד (תמיד?) הדרך הטובה ביותר לנתח ולהבין נתונים מספריים מתחילה בהצגה שלהם בצורה גרפית. הגרף המתאים מאפשר לנו לזהות בקלות תבניות, מגמות וחריגים ומציף מיד בעיות או חוסרים בנתונים.

ל -SAS יש מודול יעודי עבור יצירת גרפים בשם SAS/GRAPH אבל גם ה – SAS הבסיסי (SAS Base) כולל בתוכו יכולות גרפיות מרשימות ביותר המרוכזות תחת מספר proc-ים של משפחת ה – ODS Graphics.

ה – proc המרכזי שמאפשר לנו לייצר מגוון רחב של גרפים הוא sgplot כגון קו, עמודות, פאי ועוד רבים. ניתן, כמובן, לשלוט כמעט על כל מאפיין ועיצוב של הגרפים וגם לשלב מספר גרפים זה על גבי זה כדי לקבל תוצאות מרשימות ביותר בלי הרבה מאמץ.

נתחיל במשהו פשוט:

proc sgplot data=sashelp.steel;
	series x=date y=steel;
run;

כדי לשלוט על המאפיינים הגלובלים של כל הגרפים, כמו למשל גודל או פורמט, יש לעשות שימוש בפקודה ods graphics:

ods graphics/width=1200px height=600px imagefmt=png;
proc sgplot data=sashelp.steel;
	series x=date y=steel;
run;

וכדי לשלוט על המאפיינים הספציפיים של כל גרף יש מגוון אופציות נוספות התלויות בסוג הגרף:

proc sgplot data=sashelp.steel;
	series x=date y=steel/lineattrs=(thickness=3px color=red pattern=shortdash) 
		markers markerattrs=(color=blue symbol=asterisk);
	xaxis display=(nolabel) grid  fitpolicy=rotatethin notimesplit;
	yaxis grid label='ייצוא ברזל במיליוני טונות';
run;

חגי

SAS Innovate 2025: Call for Content

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Discussion stats
  • 0 replies
  • 298 views
  • 2 likes
  • 1 in conversation