BookmarkSubscribeRSS Feed
chemicalab
Fluorite | Level 6

Hi all,

I have performed a clustering and i would like to be able to do the profiling of those clusters using nice graphs, bars etc.

Is there any good reporting tool that you would recommend besides visual analytics to perform my task?

Kind regards

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi,

  You have several different possibilities to create bars and graphs, and in part, it depends on what software you have available. For example, if you have JMP or SAS Enterprise Miner, those software components have ways to visually explore your data and automatically produce graphs.

  On the other hand, if you have SAS Enterprise Guide, there is a Graph Gallery you can open up Graph Tasks by following a menu path (Tasks --> Graph) and then choosing the type of graph you want to produce. If you have SAS 9.2 or higher, there is also ODS GRAPHICS and the ODS GRAPHICS DESIGNER available to you for using a Graph Gallery to design your graphs.

  The method that you use is highly dependent on what you have available. If all you have is Base SAS and SAS/STAT, then you could use ODS GRAPHICS to write code, many SAS/STAT procedures will automatically produce output; or you could use the SG Procedures (SGPLOT, SGPANEL, SGSCATTER) to produce graphs. If you have SAS and SAS/GRAPH then with SAS code you can also create graphs using PROC GPLOT or GCHART.

  The answer to your question depends on what version of SAS you have and what additional components (like JMP, etc) that you have available.

cynthia

Here's a simple example. It creates several PDF files and shows some basic methods and should run on SAS 9.2 or higher.r.

** 1) use automatic procedures;

ods _all_ close;

ods pdf file='c:\temp\showgraphs1.pdf';

ods graphics on;

proc anova data=sashelp.class;

  title 'Automatic Anova Plots and Report';

   class sex;

   model height = sex;

   means sex / tukey;

run;

quit;

ods graphics off;

ods pdf close;

** 2) use SGPLOT for a Vert Bar Chart;

ods pdf file='c:\temp\showgraphs2.pdf';

proc sgplot data=sashelp.class;

  title '2) Bar Charts with SGPLOT';

  vbar age/ group=sex stat=mean response=height groupdisplay=cluster;

run;

ods pdf close;

** 3) use GCHART and SAS/GRAPH for a Vert Bar Chart;

ods pdf file='c:\temp\showgraphs3.pdf';

proc gchart data=sashelp.class;

  title '3) Bar Charts with GCHART';

  vbar sex/ group=age  patternid=midpoint

            type=mean spacing=0

            sumvar=height discrete;

run;

quit;

ods pdf close;

chemicalab
Fluorite | Level 6

Thank you very much Cynthia for the detailed reply, will try with what i have then SAS Base, thank you

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 917 views
  • 0 likes
  • 2 in conversation