I have found that a graph with a transparent background can be created on a
PC from Stata 9 in PowerPoint as follows:
1. In Stata select the graph export command to export the graph to a .wmf
file type e.g: graph export C:\Data\Graphs\filename.wmf, replace
2. Select Insert then Picture and navigate to insert the graph filename.wmf
into PowerPoint
3. Right click and select Edit Picture
4. When asked if you want to convert to a MS drawing object, select yes
5. Select the graph and fully ungroup the objects in the graph
6. Select a blank space in the graph, and when an area object is highlighted
with the handles (usually it is rectangular) delete the object selected
7. Repeat process 6 to remove all such area objects (usually 2 to 3 layers
need to be removed)
8. Select an object in the graph and regroup fully.
Note: Combination graphs have area objects for each graph combined, so
select areas to delete in each combined graph row and column.
Note: This general procedure can be used to edit any object in a graph.
Note: To check that regroup has captured all objects you can delete the
graph to see nothing is left behind, then undo the delete to return the
graph
Note: If the graph area is too large for the slide after inserting into
PowerPoint, double left click the graph, in the Format Picture dialog box
select the size tab, then select smaller height and width values (beforehand
lock the aspect ratio if not already locked).
See if this works for you.
Geoffrey Livesey B.Sc., Ph.D., R.P.H.Nutr.
Registered Public Health Nutritionist
Intelligent Nutrition and Health Research and Review
Commissioned by Industry, Government, and Academia
Member of SENSE, Professional Nutrition Consultants
www.sense-nutrition.org.uk
Member of ACUMENTIA, Professional Bioscience Consultants www.acumentia.com
INDEPENDENT NUTRITION LOGIC (INLogic) Ltd
NUTRITION RESEARCH MANAGEMENT AND CONSULTANCY
Limited Company registered in England and Wales Number 4991400
VAT Registration Number GB 731 9065 38
Tel: +44-1953-606689
Mobile: +44-7990-964609
Fax: +44-1953-600218
E: [email protected]
A: Pealerswell House
21 Bellrope Lane
Wymondham
Norfolk
NR18 OQX
United Kingdom
W: www.inlogic.co.uk
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jacob Wegelin
Sent: 14 April 2009 22:20
To: [email protected]
Subject: Re: st: transparent background with graph for powerpoint
In case anybody else is interested in this question, here is an answer that
Stata Tech Support emailed to me today:
There isn't an option in Stata that will allow you to create a "clear"
background for graphs. However, I have seen users add a picture or scene as
the background with third-party programs such as PhotoShop.
You can try the following instructions in PhotoShop to place a graph on a
picture background:
Open Stata graph in PhotoShop. Place graph in its own layer (not
background).
Select magic wand and in the magic wand options, set tolerance to 0, uncheck
anti-aliasing, check contiguous.
Select background. If all of background not selected, select Similar from
the Select menu. Delete selection.
Place background image in layer below Stata graph.
If you're looking to match the background to a specific color, Stata graphs
will take RBG values in addition to the preset colors listed. For example:
. twoway (scatter x4 x3), graphregion(fcolor(212 55 155))
Hope this helps.
It's possible that the transparent feature could be made available in a
future release, but there hasn't been anything mentioned specifically for an
update, etc.
On Sun, Apr 12, 2009 at 2:59 PM, Jacob Wegelin <[email protected]>
wrote:
> Consider a graph created in Stata on a MacBook Pro. Is there a way to
> put this graph into Powerpoint so that the Powerpoint background (a
> texture, an image, a color, etc.) shows through?
>
> sysuse auto, clear
> twoway (scatter price mpg), aspectratio(1) graphregion(color(none))
> graph export junk.pdf, replace graph export junk.eps, replace
> graph export junk.tif, replace
>
> Within Powerpoint, when I Insert -> Picture and then insert either
> junk.eps or junk.tif, the plot covers up ("whites out") the background
> texture all the way through the outer graph region. When I insert
> junk.pdf, only the inner plot region whites out the texture. Thus none
> of these approaches allows the background to show through the
> "non-inked" portions of the plot. (And for display, one cannot export
> directly to pdf on a Mac because smooth curves are somehow corrupted
> in the export process.)
>
> A thread from 2004 (see below) suggests that this might be a Macintosh
> problem; if I did this on a PC would the graph be transparent? But
> better yet: Is there a way to do this on a Mac?
>
> Thanks for any insight
>
> Jacob A. Wegelin
> Assistant Professor
> Department of Biostatistics
> Virginia Commonwealth University
> 730 East Broad Street Room 3006
> P. O. Box 980032
> Richmond VA 23298-0032
> U.S.A.
> E-mail: [email protected]
> URL: http://www.people.vcu.edu/~jwegelin
>
>
> From Fredrik Wallenberg <[email protected]>
> To [email protected]
> Subject Re: RE: st: Re: Transparent background in graphics Date
> Thu, 20 May 2004 10:54:14 -0700
> Thank you, that is excellent news. As I said earlier, it is quite
> easy to edit out the background of an eps or pdf file using Adobe
> Illustrator, so at least that is a workaround for now. The PDF format
> does support transparency, so that should work. However, as long as
> you are relying on Apple's built in "print-to-pdf" functionality you
> will be stuck with a white background (since the graphic is actually
> printed onto a white "paper"). If you actually implement a true "save
> as pdf" functionality into Stata you should be fine.
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/