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
Diamond | Level 26

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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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