BookmarkSubscribeRSS Feed
brophymj
Quartz | Level 8

Hi I have a query in relation to creating graphs and exporting them to sheets in excel.

I'm trying to automate a process where I export four graphs for a particular factor for 20 factors. Creating macros in excel to do this is very slow and time-consuming. Below is a sample dataset showing details for one factor.

I've included a screenshot of what I want the graphs to look like. So the exposure will be a bar chart, the ratios will be a line chart etc. Is it possible to output in a tiled format? I'm new to sas/graph so any help would be greatly appreciated.

factorlevelno_of_observationsexposureRatio1Ratio2value1200820092010201120122013
factor115001000105%35%2000                   
  - 
                   
  - 
                    39                  172                  280                  348
factor121000200082%25%3000                       0
                       1
                    74                  463                  605                  644
factor1320000300080%22%2000                       0
                       0
                  177                  477                  469                  633
factor142300050076%21%1000                       0
                       0
                  185                  988                  641                  494
factor1522333800086%40%3500              1,794              1,882              1,208              1,014              1,078                  797

graph.PNG
2 REPLIES 2
Reeza
Super User

What version of SAS do you have?

Have you checked Rob AllI sons page?

Robslink.com

brophymj
Quartz | Level 8

9.3 with sas/stat, sas/graph, sas/access, sas/export.

Thanks for the link.

In terms of exporting to a program out of sas, can you export to xlsx without it messing up the format? Is it better to output to pdf for graphs. I don't need to edit the graphs as this will all be done in SAS before the export.

Finally is it possible to export 4 graphs on one page/sheet?

Thanks

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 783 views
  • 0 likes
  • 2 in conversation