BookmarkSubscribeRSS Feed
jhirschb
Calcite | Level 5

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.

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

So the nub of the question here is that you want to create emf files?  If so:

http://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#n030hgajs8pdqln1vwp5...

 

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:

http://blogs.sas.com/content/graphicallyspeaking/

jhirschb
Calcite | Level 5

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

DanH_sas
SAS Super FREQ

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.

Jay54
Meteorite | Level 14

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.

jhirschb
Calcite | Level 5

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.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

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
  • 6 replies
  • 1224 views
  • 2 likes
  • 4 in conversation