LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 19 Oct 2010 10:47:24 +0200
Reply-To:   Andre Wielki <wielki@INED.FR>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Andre Wielki <wielki@INED.FR>
Subject:   Re: Exporting publication quality graph
Comments:   To: Marc Mooney <moon0078@UMN.EDU>
In-Reply-To:   <4CBCC95D.6000300@umn.edu>
Content-Type:   text/plain; charset=ISO-8859-1; format=flowed

Marc, Without a sample of data, i cannot construct something directly usefull but the general ways of working are

1)decide what is your ultimate goal a)a html page, b) a kind of book or report c) or an isolated graph

2) the c) can be managed by goptions with special attention to device= and for size a combination of vsize/hsize or xsize/ysize depending of the characteristic of the chosen device

As you were speaking about export, i suppose you have tried the internal export of SAS and then you have insert your graphic file into another file

You are describing the fact that your annotate was drewed following a reference to a frame of x/y dimension and that your graph initialy 'looking correct' was resized at insertion into the other file and then you see a discordance between both parts. With fixing the vsize and hsize narrower your graph have chance to be stable.

using device=win is not the same as winprt as screen is not the same as a letter/a4 paper

3) with the TS already referenced you have got informations for a) b) in version 9.1.3 (some few recommendations were changed in the case of 9.2... as the ods destinations were rebuilded) The implicit device is different for rtf than for pdf or for html! remember this!!!

4)generally you have to be more precise in matter of units perhaps this is due to the fact that i am working in Europe were i often explicit the mention cm or mm this can also be a source of displacing!

HTH Andre

Le 19/10/2010 00:25, Marc Mooney a écrit : > Hi all, > > I am new to the LISTSERV. I have managed to draw a really nice figure > using PROC GPLOT. However, when exporting my figure, I am getting > figures that look grainy or which have annotated features displaced on > the figure. > > *filename outgraph 'G:\Current Documents\1. Papers\1. In-Progress > Projects\Dependence Regression Paper\3. Analyses\Graphs\Figure 1 Plot > A.gif'; > *goptions gsfname=outgraph dev=gif; > > I tried the ODS and the figure looked fuzzy (did not resize dimensions). > > ods pdf body = "G:\Current Documents\1. Papers\1. In-Progress > Projects\Dependence Regression Paper\3. Analyses\Graphs\pie.pdf"; > ods pdf close; > > Can you all please suggest some code to get my graphs out of SAS and > looking as good as SAS drew them? > > Thank you, > > Marc > > > %annomac; > data annotate_data_ex4; > %dclanno; > xsys='2'; ysys='2'; hsys='2'; > **White-Out Rectangle; > when='A'; > %bar(28,4.4,35.9,3,white,3,solid); > **Reference Line Label; > function='label'; color="black"; x=2.1; y=5; text='25% Reduction'; > size=.15; style='"Times New Roman"';output; > function='label'; color="black"; x=13.8; y=5; text='50% Reduction'; > size=.15; style='"Times New Roman"';output; > function='label'; color="black"; x=25.8; y=5; text='75% Reduction'; > size=.15; style='"Times New Roman"';output; > proc print; > run; > > goptions reset=all; > > *filename outgraph 'G:\Current Documents\1. Papers\1. In-Progress > Projects\Dependence Regression Paper\3. Analyses\Graphs\HW1Fig1b.gif'; > *goptions gsfname=outgraph dev=gif; > > Legend1 > label = none > value=(h = 1.5 font='Times New Roman' 'Ad Lib Smoking' 'Reduced Smoking' > 'Nicotine Gum') > across=1 down=7 > position = (top right inside) > mode = protect; > > axis1 order=(1,3,6,9,12,15,18,21,24,27,30,33,36) value=(h = 1 > font='Times New Roman') > w = 2 major =( h = 1 w = 2) minor=none label=(h = 2 f= 'Times New > Roman' 'Time of Day'); > axis2 order=(0 to 5 by 1) value=(h = 1.5 font='Times New Roman') > w = 2 major =(h = 1 w = 2) minor=none label=(a = 90 h = 2 f= > 'Times New Roman' 'Event Rate'); > Symbol1 Value=dot Interpol=j l = 20 h = 1 Width = 2 Color=black; > Symbol2 Value=circle Interpol=j l = 1 h = 1.5 Width = 1 Color=black; > Symbol3 Value=square Interpol=j l = 4 h = 1.5 Width = 1.75 Color=black; > Symbol4 Value=circle Interpol=j l = 1 h = 1.5 Width = 1 Color=black; > Symbol5 Value=square Interpol=j l = 4 h = 1.5 Width = 1.75 Color=black; > Symbol6 Value=circle Interpol=j l = 1 h = 1.5 Width = 1 Color=black; > Symbol7 Value=square Interpol=j l = 4 h = 1.5 Width = 1.75 Color=black; > > proc gplot data = rev.ciggum; > where sid = 67; > > plot event_rate*bin_c2 = form2/ legend = legend1 anno = > annotate_data_ex4 > href = 12 > 24 > lhref = 33 haxis=axis1 vaxis=axis2 frame ; > format bin_c2 tbin3_.; > run; > quit; > > -- > ________________________________________________ > > Marc Mooney, Ph.D., L.P. > Assistant Professor > Department of Psychiatry > University of Minnesota > F-256/2B West, 2450 Riverside Ave. > Minneapolis, MN 55454 > Phone: 612-293-7273 > Fax: 612-273-9779 > Pager: 612-899-8224 > E-mail: moon0078@umn.edu > ________________________________________________ > > Electronic messages can be misdirected or intercepted by unintended parties.The University of Minnesota can > not and does not guarantee the confidentiality of messages sent over the Internet. Messages sent to or > received from work e-mail accounts also may be monitored or viewed by your employer. If you have received > this communication in error, please notify the sender immediately and delete the information. > >

-- André WIELKI INED (Institut National d'Etudes Démographiques) Service Informatique 133 Boulevard Davout 75980 Paris Cedex 20 mél : wielki@ined.fr tél : 33 (0) 1 56 06 21 54


Back to: Top of message | Previous page | Main SAS-L page