If I create a figure using a SAS graph procedure I am able to edit that figure by right clicking on the figure from the results window. Once in the editor I can select the figure and copy it. Then I can open MS VISIO and paste it into a new figure screen as Picture (Enhanced Metafile) which I can then ungroup it so that I can edit all the components of the figure. I need to do this to insert and edit elements of the figure. Also no matter how large I make the figure it still retains the detail of the original. In using the Sgplot routine I can only get a snapshot picture that cannot be edited in this way.
Is it possible to have sgplot produce an enhanced metafile that I can ungroup and edit in MS Visio?
Thanks Joe
PS since these actions are interactive I don't think my code would be helpful.
So the nub of the question here is that you want to create emf files? If so:
Although why you would want to be manually editing a graph after generation is beyond me. You can do all kinds of manipulations, layers, boxes etc. with the graph procedure, and then you only need to run it. If you need examples use this blog which has code examples for thousands of graphs:
Thanks, I was able to use the OUTPUTFMT=svg to generate files that I could edit in Visio (with some work).
I was also wondering if you knew how I could set up sgplot with the heatmap option to generate the map in shades of grey so that I may use the results in a publication?
Thanks again, Joe
You can use the JOURNAL style to do it:
ods html5 style=journal;
or use the COLORMODEL=() option to set two or more gray shades for the continuous shading.
As suggested by RW9, you can customize a graph using SGPLOT, and also use annotation if needed. Additionally, you can create an SGE file (add SGE=on to the destination) and then open the graph in the SGEditor for editing.
All of these solutions ignore the use of a graphics editor like Visio that can use an de-group a graphics file so that you can edit each part. This is especially useful for modifying the results of a graphics program. To code all the changes for a one-off diagram is far too cumbersome. Obviously, for production purposes one would code the modifications. In addition, I have used this to add such features as lines that are tangent to ellipses drawn by a graphics routine that have been published.
If all you want to do is take some data then mess about with it in some other application, then use a tool better suited to that. MS Visio for instance isn't a graphing tool really. I would suggest some sort of process analysis, identifying requirements, what tools are best placed to do what you want etc. All we can suggest from SAS end is to create emf or svg files.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.
Ready to level-up your skills? Choose your own adventure.