LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 27 Feb 2009 10:55:19 +0100
Reply-To:     Andre Wielki <wielki@INED.FR>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Andre Wielki <wielki@INED.FR>
Subject:      Re: Rotating text in png files
Comments: To: "hvidkjaer@gmail.com" <hvidkjaer@GMAIL.COM>
In-Reply-To:  <ef228ca0-6be7-4c9f-a78c-26fbf534827e@q9g2000yqc.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Soeren

this show you that it is working

libname gdevice0 "d:\sasv913" ; %macro PNGSZ(dpi=600, newdev=PNGL, ptsize=12, h=8.5, w=11, units=IN, libref=GDEVICE0); %let XPIXELS = %sysevalf(&dpi * &w); %let YPIXELS = %sysevalf(&dpi * &h); %let ROWS = %sysevalf(&h / (&PTSIZE/72), floor); %let LFACTOR = %sysevalf(&dpi / 100, floor);

%put _user_;

proc gdevice c=&libref..devices nofs noprompt; delete &newdev copy PNG from=sashelp.devices newname=&newdev; mod &newdev xmax = &w &units ymax = &h &units xpixels = &XPIXELS ypixels = &YPIXELS lrows = &rows lcols = 70 prows = &ROWS pcols = 70 lfactor=&lfactor devopts = '3502304009280008'x %if &sysver GE 9.1 %then charrec = (0, 1, 1, 'SAS Monospace', 'Y'); ; run; quit; %mend PNGSZ;

%pngsz goptions reset=all; ods listing close; options orientation=landscape; ods pdf file="d:\temp\anglerot.pdf";

goptions target=png ; title "45° for letters 45 for text"; axis1 value = (rotate=45 angle=45); proc gplot data=sashelp.class; plot height * weight /haxis=axis1; run; ods pdf startpage=now; title "0° for letters 45 for text"; axis1 value = (rotate=0 angle=45); proc gplot data=sashelp.class; plot height * weight /haxis=axis1; run; quit; ods pdf close; ods listing;

hvidkjaer@gmail.com a écrit : > Hi, > > I've created a png device driver using the macro below. The macro is > from SI, but modified for landscape figures. The output looks fine, > except that I'm not able to change the orientation of the axis text > (that is, of the individual characters). For instance, running > > axis1 value = (rotate=0 angle=90); > > and then a proc gplot, leaves the axis text scattered below the axis, > with no angling. Am I missing something in the device statement below > (or elsewhere) that could solve this? Thanks for any help. > > -Soeren Hvidkjaer > > > %macro PNGSZ(dpi=600, newdev=PNG, ptsize=12, h=8.5, w=11, units=IN, > libref=GDEVICE0); > %let XPIXELS = %sysevalf(&dpi * &w); > %let YPIXELS = %sysevalf(&dpi * &h); > %let ROWS = %sysevalf(&h / (&PTSIZE/72), floor); > %let LFACTOR = %sysevalf(&dpi / 100, floor); > > %put _user_; > > proc gdevice c=&libref..devices nofs noprompt; > delete &newdev > copy PNG from=sashelp.devices newname=&newdev; > mod &newdev > xmax = &w &units ymax = &h &units > xpixels = &XPIXELS ypixels = &YPIXELS > lrows = &rows lcols = 70 > prows = &ROWS pcols = 70 > lfactor=&lfactor > devopts = '3502304009280008'x > %if &sysver GE 9.1 %then > charrec = (0, 1, 1, 'SAS Monospace', 'Y'); ; > quit; > %mend PNGSZ; > >

-- 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