Date: Thu, 12 Dec 2002 14:33:37 -0500
Reply-To: "Karl K." <karlstudboy@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Karl K." <karlstudboy@HOTMAIL.COM>
Subject: Re: y axis labels
On Wed, 11 Dec 2002 09:14:07 -0800, Paul von Hippel -- Ohio State
<pvh@CCRMA.STANFORD.EDU> wrote:
>Using PROC GPLOT or the HISTOGRAM statement in PROC UNIVARIATE,
>is it possible to get the Y axis label to read straight across,
>like this,
>
> |
> |
>label|
> |
> |
> _______________________
>
> (snip)
You don't appear to have gotten a lot of traction, so I'll toss in $.02.
First, Univariate is out--I don't think you can do it. As for GPLOT,
don't you mean GCHART? That's the proc that does histograms. Either way
though, I believe there are 2 kludgy ways to get what you want in
SAS/Graph.
1) Suppress the axis label and simulate it with a note:
goptions reset=all;
axis1 label=none;
proc gchart data = sashelp.class;
vbar height / raxis=axis1;
note move=(+20pct,-40pct) "Label as Note";
run;
(You'll need to screw around with the coordinates in the "move", and
possibly with "horigin" as well.)
2) This way belongs with Mike's cheasy, sleazy tricks. If you change the
angle of the y-axis label, SAS/Graph centers it (who knows why):
goptions reset=all;
axis2 label=(angle=.0001 "Label Angled");
proc gchart data = sashelp.class;
vbar height / raxis=axis2;
run;
The angle is approx. = 0, so it looks horizontal, but is centered on the Y-
axis.
HTH
Karl