From: "Lane, Jim" on
Richard: thanks for this. When I ran your code on my system I get a
graph where the otherwise white background behind the bars is gray for
all the bars up to and including Oct 2005. Is that what you expected it
to do?

I think this will give me what I'm after if I just change the hard coded
month value for x as required.

BTW you wouldn't happen to know where this annotate facility is
documented for beginners such as myself? All the examples I've ever seen
dive right into it assuming a lot of background I don't have.

/JL

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of
Richard A. DeVenezia
Sent: 2009, September, 21 4:17 PM
To: SAS-L(a)LISTSERV.UGA.EDU
Subject: Re: Reference line on PROC GCHART output

On Sep 21, 1:58 pm, jim.l...(a)RBC.COM ("Lane, Jim") wrote:
> Hi, All
>
> I'm having trouble getting GCHART to co-operate. My program so far
> looks like this.=20
>
> axis1 value=3D(h=3D0.5) ;
> axis5 value=3D(h=3D0.5) label=3Dnone order=3D('01oct2000'd to
> '01oct2012'd = by qtr); proc gchart data=3Dwork.c;
> vbar month / type=3Dsum sumvar=3Dx subgroup=3Dc axis=3Daxis1
> maxis=3Da=
> xis5
> discrete ;
> run; quit;
>
> This is producing a vertical bar chart as I expect. My problem is that

> I would like to divide the chart somehow by drawing a vertical
> reference line so that the bars for months in the past lie to the left

> of the line and the future is to the right. I've tried to do this with

> options such
> as:
>
> href=3D'01sep2009'd lref=3D2 cref=3Dblue
>
> This produces neither a reference line nor an error message. What am I

> doing wrong here?
>
> -Jim Lane

It probably has to do 01sep not falling on a QTR start date.

You might get a better visual impact by using annotate to draw an off
color bar for the 'earlier' time period.

The annotate in this sample uses coordinate system '7' to produce a
second bar that visually extends the gray area.

-----------------
goptions reset=all;

data foo;
do date = '01OCT2000'd to '01OCT2012'd;
x = int(10*ranuni(1234));
c = byte (65+5*ranuni(1234));
output;
end;
run;


axis1 value=(h=0.5) ;
axis5 value=(h=0.5) label=none order=('01oct2000'd to '01oct2012'd by
qtr);

%annomac;
data myanno;
%dclanno;
xsys = '1'; x=0;
ysys = '1'; y=0;
function = 'move';
OUTPUT;

xsys = '2'; x='01oct2005'd;
ysys = '1'; y=100;
function = 'bar';

color = 'cxC0C0C0';
style = 'solid';
line = 0;
output;

xsys = '7'; x=0.8;
y = 0;
output;
run;

proc gchart data=work.foo;
format date yyqd.;
vbar date
/ type=sum
sumvar=x
subgroup=c
axis=axis1
maxis=axis5
discrete
anno = myanno
;
run;quit;
-----------------

Richard A. DeVenezia
http://www.devenezia.com
_______________________________________________________________________

This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations.
Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized.
If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.

Ce courrier �lectronique est confidentiel et prot�g�. L'exp�diteur ne renonce pas aux droits et obligations qui s'y rapportent.
Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) d�sign�(s) est interdite.
Si vous recevez ce courrier �lectronique par erreur, veuillez m'en aviser imm�diatement, par retour de courrier �lectronique ou par un autre moyen.
From: Joe Whitehurst on
All your annotates can be data driven. Here is a simple example of some
vertical lines and bars that are completely data driven:
FILENAME trafsumm FTP '/sasweb/images/MTD_Traffic_Summary.gif'
host=3D'10.102.8.248'
user=3D'sascont1'
pass=3D'sas4auto99'
recfm=3Ds
;

goptions reset=3Dall
gaccess=3Dgsasfile gsfmode=3Dreplace prompt dev=3Dgif733
gsfname=3Dtrafsumm
vpos=3D0 hpos=3D0 htext=3D1 ftext=3Dswissb rotate=3Dlandscape bor=
der
hby=3D1 fby=3Dswissb cby=3Dblack ctext=3Dblack;;
*goptions reset=3Dall dev=3Dwin;
*goptions reset=3Dall rotate=3Dlandscape border dev=3Dwin targetdevice=3Dgi=
f733;
title1 c=3Dblack f=3Dswissb h=3D2 j=3Dc ' ';
title2 c=3Dblack f=3Dswissb h=3D2 j=3Dc 'TRAFFIC SUMMARY';
%annomac;
data weekends;
%system(2,1);
%dclanno;
text=3D'WKND';
do day=3D&begdate to &enddate by 1;
weekday=3Dweekday(day);
if weekday=3D7 then do;
when=3D'B';
%system(2,1);
%bar(day,0,day+1,100,pay,0,s);
text=3D'WKND';
%label(day+.5,100,text,black,0,0,1,swissb,b);
end;
if weekday=3D1 then wkday=3D'S';
else if weekday=3D2 then wkday=3D'M';
else if weekday=3D3 then wkday=3D'T';
else if weekday=3D4 then wkday=3D'W';
else if weekday=3D5 then wkday=3D'T';
else if weekday=3D6 then wkday=3D'F';
else if weekday=3D7 then wkday=3D'S';
%system(2,1);
%label(day,97,wkday,black,0,0,1,swissb,b);
end;
run;
symbol1 interpol=3Djoin line=3D1 value=3Ddot h=3D.5 width=3D2 color=3Dblu=
e;
symbol2 interpol=3Djoin line=3D1 value=3Ddot h=3D.5 width=3D2 color=3Dred=
;
symbol3 interpol=3Djoin line=3D1 value=3Ddot h=3D.1 width=3D1 color=3Dred=
;
symbol4 interpol=3Djoin line=3D1 value=3Ddot h=3D.1 width=3D1 color=3Dpin=
k;
symbol5 interpol=3Djoin line=3D1 value=3Ddot h=3D.1 width=3D1 color=3Dcya=
n;
symbol6 interpol=3Djoin line=3D1 value=3Ddot h=3D.1 width=3D1 color=3Dwhi=
te;

symbol7 interpol=3Djoin line=3D1 value=3Ddot h=3D.1 width=3D1 color=3Dred=
;
symbol8 interpol=3Djoin line=3D1 value=3Ddot h=3D.1 width=3D1 color=3Dred=
;
symbol9 interpol=3Djoin line=3D1 value=3Ddot h=3D.1 width=3D1 color=3Dblu=
e;
symbol10 interpol=3Djoin line=3D1 value=3Ddot h=3D.1 width=3D1 color=3Dpin=
k;
symbol11 interpol=3Djoin line=3D1 value=3Ddot h=3D.1 width=3D1 color=3Dcya=
n;
symbol12 interpol=3Djoin line=3D1 value=3Ddot h=3D.1 width=3D1 color=3Dwhi=
te;

axis1 order=3D(0 to 8 by .5)
minor=3D(number=3D5)
label=3D(rotate=3D0 angle=3D0 j=3Dr h=3D1.25 f=3Dswissb c=3Dblue 'Dai=
ly'
j=3Dr 'Pages'
j=3Dr 'Viewed'
j=3Dr "(100k's)")
value=3D(color=3Dblue f=3Dswissb)
length=3D70pct
offset=3D(0,2)
width=3D3;
axis2 order=3D('01aug99'd to '31aug99'd by day)
minor=3Dnone /*(number=3D0) */
label=3D(color=3Dblack f=3Dswissb h=3D1.25 'August 1999')
value=3D(color=3Dblack f=3Dswissb h=3D.8)
length=3D80pct
offset=3D(0,0)
width=3D3;
axis3 order=3D(0 to 14 by 1)
minor=3D(number=3D3)
label=3D(rotate=3D0 angle=3D0 j=3Dl h=3D1.25 f=3Dswissb c=3Dred 'Dail=
y '
j=3Dl 'Visitors'
j=3Dl "(10K's)")
value=3D(color=3Dred f=3Dswissb)
length=3D70pct
offset=3D(0,2)
width=3D3;
proc gplot data=3Dtrafsum2 anno=3Dweekends;
format date day2. pgsviewd mtdpages cvisitor 3.2;
plot pgsviewd*date
/
vaxis=3Daxis1
haxis=3Daxis2
/*cframe=3Dyellow*/;
plot2 visitors*date /

vaxis=3Daxis3
haxis=3Daxis2;
run;
quit;




On Tue, Sep 22, 2009 at 7:08 AM, Lane, Jim <jim.lane(a)rbc.com> wrote:

> Hi, Robin
>
> Am I to assume from this that annotate positions things at a fixed locati=
on
> relative to the edges of the graph? If so, I don't see how it will help m=
e.
> I want to draw a reference line over the bar for "this month". Given that=
I
> can't know in advance where "this month" will fall on the page I would ha=
ve
> to run the graph without the reference line, measure where "this month" i=
s
> this month, then re-program the annotate code and re-draw the reference l=
ine
> every month. I guess I could do that but I'd hardly call it simple. For m=
e,
> simple is href and vref the way they work with GPLOT.
>
> Thanks for the example. I've been meaning to get my head around annotate =
so
> maybe this is as good a time as any,
>
> /JL
>
> ________________________________
>
> From: Robin R High [mailto:rhigh(a)unmc.edu]
> Sent: 2009, September, 21 3:23 PM
> To: Lane, Jim
> Cc: SAS-L(a)LISTSERV.UGA.EDU
> Subject: Re: Reference line on PROC GCHART output
>
>
>
> Jim,
>
> The annotate capability can be quite flexible for the simple task of addi=
ng
> a vertical line; in the example below x=3D50 with xsys=3D'1' implies to s=
tart at
> the middle (50%) of the graph area and x2 from 0 to 80 is the numerical
> scale for the vertical axis (ysys=3D'2'). You may need to experiment to f=
ind
> the best value for x for the placement of the line to show past versus
> future. You can also easily change the line type, size, color, with other
> options.
>
> DATA lne1; RETAIN xsys '1' ysys '2' when 'a'; LENGTH color $8 ;
> x=3D50 ; y=3D0 ; function=3D'MOVE'; output;
> x=3D50 ; y=3D80 ; function=3D'DRAW'; color=3D'black'; line=3D1; size=3D2;=
output;
>
> proc print; run;
>
> proc gchart data=3Dsashelp.class ;
> vbar age / discrete sumvar=3Dheight type=3Dmean outside=3Dmean raxis=3Dax=
is1
> width=3D8 annotate=3Dlne1;
> run; quit;
>
> Robin High
> UNMC
>
>
>
>
>
>
>
> From: "Lane, Jim" <jim.lane(a)RBC.COM>
> To: SAS-L(a)LISTSERV.UGA.EDU
> Date: 09/21/2009 01:00 PM
> Subject: Reference line on PROC GCHART output
> Sent by: "SAS(r) Discussion" <SAS-L(a)LISTSERV.UGA.EDU>
>
> ________________________________
>
>
>
>
> Hi, All
>
> I'm having trouble getting GCHART to co-operate. My program so far looks
> like this.
>
> axis1 value=3D(h=3D0.5) ;
> axis5 value=3D(h=3D0.5) label=3Dnone order=3D('01oct2000'd to '01oct2012'=
d by
> qtr);
> proc gchart data=3Dwork.c;
> vbar month / type=3Dsum sumvar=3Dx subgroup=3Dc axis=3Daxis1 maxis=3Da=
xis5
> discrete ;
> run; quit;
>
> This is producing a vertical bar chart as I expect. My problem is that I
> would like to divide the chart somehow by drawing a vertical reference
> line so that the bars for months in the past lie to the left of the line
> and the future is to the right. I've tried to do this with options such
> as:
>
> href=3D'01sep2009'd lref=3D2 cref=3Dblue
>
> This produces neither a reference line nor an error message. What am I
> doing wrong here?
>
> -Jim Lane
> _______________________________________________________________________
>
> This e-mail may be privileged and/or confidential, and the sender does no=
t
> waive any related rights and obligations.
> Any distribution, use or copying of this e-mail or the information it
> contains by other than an intended recipient is unauthorized.
> If you received this e-mail in error, please advise me (by return e-mail =
or
> otherwise) immediately.
>
> Ce courrier =E9lectronique est confidentiel et prot=E9g=E9. L'exp=E9diteu=
r ne
> renonce pas aux droits et obligations qui s'y rapportent.
> Toute diffusion, utilisation ou copie de ce message ou des renseignements
> qu'il contient par une personne autre que le (les) destinataire(s)
> d=E9sign=E9(s) est interdite.
> Si vous recevez ce courrier =E9lectronique par erreur, veuillez m'en avis=
er
> imm=E9diatement, par retour de courrier =E9lectronique ou par un autre mo=
yen.
>
>
>
> _______________________________________________________________________
>
> This e-mail may be privileged and/or confidential, and the sender does no=
t
> waive any related rights and obligations.
> Any distribution, use or copying of this e-mail or the information it
> contains by other than an intended recipient is unauthorized.
> If you received this e-mail in error, please advise me (by return e-mail =
or
> otherwise) immediately.
>
> Ce courrier =E9lectronique est confidentiel et prot=E9g=E9. L'exp=E9diteu=
r ne
> renonce pas aux droits et obligations qui s'y rapportent.
> Toute diffusion, utilisation ou copie de ce message ou des renseignements
> qu'il contient par une personne autre que le (les) destinataire(s)
> d=E9sign=E9(s) est interdite.
> Si vous recevez ce courrier =E9lectronique par erreur, veuillez m'en avis=
er
> imm=E9diatement, par retour de courrier =E9lectronique ou par un autre mo=
yen.
>
From: Arthur Tabachneck on
Jim,

I can edit the pdf version of the graph on my machine, but possibly because
I license adobe acrobat rather than acrobat reader.

Art
--------
On Tue, 22 Sep 2009 07:11:03 -0400, Lane, Jim <jim.lane(a)RBC.COM> wrote:

>Hi, Art
>
>The sneaky approach. I love it. Seriously though, I'm producing graphs as
PDF files. How do I edit them?
>
>/JL
>
>-----Original Message-----
>From: Arthur Tabachneck [mailto:art297(a)NETSCAPE.NET]
>Sent: 2009, September, 21 4:09 PM
>To: SAS-L(a)LISTSERV.UGA.EDU; Lane, Jim
>Subject: Re: Reference line on PROC GCHART output
>
>Jim,
>
>Yes, SAS doesn't make it as easy to draw a reference line on the other
axis. And, if this is something you have to do to many graphs, annotate is
probably the way to go.
>
>However, if it is a one-off, you can always click on the graph, then click
on edit, and simply draw the desired line.
>
>Art
>-------
>On Mon, 21 Sep 2009 14:47:09 -0400, Lane, Jim <jim.lane(a)RBC.COM> wrote:
>
>>Art: thanks. Interesting. If I run that as is
>>
>>
>>proc gchart data=a;
>> vbar3d YEAR / sumvar=CNT discrete raxis=axis1
>> coutline=black cframe=yellow width=5
>> vref=30 inside=sum frontref;
>>
>>I get a reference line. If I change it to something closer to what I'm
>after
>>
>>proc gchart data=a;
>> vbar YEAR / sumvar=CNT discrete raxis=axis1
>> coutline=black cframe=yellow width=5
>> href=1999 inside=sum frontref;
>>
>>I don't get a reference line, just a warning message:
>>
>>WARNING: The reference line at 1999 on the vertical axis labeled CNT
>>SUM
>is out of range.
>>
>>How can that be given that YEAR ranges from 1997 to 2001? Also why does
>it say "vertical axis" when I asked for a horizontal axis?
>>
>>/JL
>>
>>-----Original Message-----
>>From: Arthur Tabachneck [mailto:art297(a)NETSCAPE.NET]
>>Sent: 2009, September, 21 2:39 PM
>>To: SAS-L(a)LISTSERV.UGA.EDU; Lane, Jim
>>Subject: Re: Reference line on PROC GCHART output
>>
>>Jim,
>>
>>Take a look at the example shown at:
>>http://support.sas.com/kb/24/868.html
>>
>>It describes how to combine vref=somevalue and frontref.
>>
>>Art
>>--------
>>On Mon, 21 Sep 2009 13:58:46 -0400, Lane, Jim <jim.lane(a)RBC.COM> wrote:
>>
>>>Hi, All
>>>
>>>I'm having trouble getting GCHART to co-operate. My program so far
>>>looks like this.
>>>
>>>axis1 value=(h=0.5) ;
>>>axis5 value=(h=0.5) label=none order=('01oct2000'd to '01oct2012'd by
>>>qtr); proc gchart data=work.c;
>>> vbar month / type=sum sumvar=x subgroup=c axis=axis1 maxis=axis5
>>>discrete ; run; quit;
>>>
>>>This is producing a vertical bar chart as I expect. My problem is that
>>>I would like to divide the chart somehow by drawing a vertical
>>>reference line so that the bars for months in the past lie to the left
>>>of the line and the future is to the right. I've tried to do this with
>>>options such
>>>as:
>>>
>>>href='01sep2009'd lref=2 cref=blue
>>>
>>>This produces neither a reference line nor an error message. What am I
>>>doing wrong here?
>>>
>>>-Jim Lane
>>>______________________________________________________________________
>>>_
>>>
>>>This e-mail may be privileged and/or confidential, and the sender does
>>not waive any related rights and obligations.
>>>Any distribution, use or copying of this e-mail or the information it
>>contains by other than an intended recipient is unauthorized.
>>>If you received this e-mail in error, please advise me (by return
>>>e-mail
>>or otherwise) immediately.
>>>
>>>Ce courrier �lectronique est confidentiel et prot�g�.
>>>L'exp�diteur ne
>>renonce pas aux droits et obligations qui s'y rapportent.
>>>Toute diffusion, utilisation ou copie de ce message ou des
>>>renseignements
>>qu'il contient par une personne autre que le (les) destinataire(s)
>>d�sign�
>>(s) est interdite.
>>>Si vous recevez ce courrier �lectronique par erreur, veuillez m'en
>>>aviser
>>imm�diatement, par retour de courrier �lectronique ou par un autre
moyen.
>>_______________________________________________________________________
>>
>>This e-mail may be privileged and/or confidential, and the sender does
>not waive any related rights and obligations.
>>Any distribution, use or copying of this e-mail or the information it
>contains by other than an intended recipient is unauthorized.
>>If you received this e-mail in error, please advise me (by return
>>e-mail
>or otherwise) immediately.
>>
>>Ce courrier �lectronique est confidentiel et prot�g�.
>>L'exp�diteur ne
>renonce pas aux droits et obligations qui s'y rapportent.
>>Toute diffusion, utilisation ou copie de ce message ou des
>>renseignements
>qu'il contient par une personne autre que le (les) destinataire(s)
d�sign�
>(s) est interdite.
>>Si vous recevez ce courrier �lectronique par erreur, veuillez m'en
>>aviser
>imm�diatement, par retour de courrier �lectronique ou par un autre moyen.
>_______________________________________________________________________
>
>This e-mail may be privileged and/or confidential, and the sender does not
waive any related rights and obligations.
>Any distribution, use or copying of this e-mail or the information it
contains by other than an intended recipient is unauthorized.
>If you received this e-mail in error, please advise me (by return e-mail or
otherwise) immediately.
>
>Ce courrier �lectronique est confidentiel et prot�g�. L'exp�diteur ne
renonce pas aux droits et obligations qui s'y rapportent.
>Toute diffusion, utilisation ou copie de ce message ou des renseignements
qu'il contient par une personne autre que le (les) destinataire(s)
d�sign�(s) est interdite.
>Si vous recevez ce courrier �lectronique par erreur, veuillez m'en aviser
imm�diatement, par retour de courrier �lectronique ou par un autre moyen.
From: Richard DeVenezia on
Hi Jim:

The annotation code I posted used a trick.

The gray area is really two filled rectangles.
A filled rectangle is drawn using the BAR function.
The Bar function draws a rectangle using the x,y from the previous row
in the annotate data, to the x,y in the current row (having
function='BAR')

The first x,y of the first rectangle is
0,0 in coordinate system '1','1'
Coordinate system '1' means % of graphics output area (the area inside
the frame where the bars are drawn)
0,0 of course means the lower left of that area.

The second x,y of the first rectangle is
'01oct2005'd, 100 in coordinate systems '2','1'
Coordinate system '2' means data coordinates
So
x='01oct2005'd will set the right edge of the rectangle at where-ever
that midpoint is plotted by the system, and
y=100 will set the top edge of the rectangle at 100% of graphics
output area (which is the top of the frame)

The second gray rectangle is the trick and is used to expand the
grayish background past the midpoint of the '01oct2005'd bar to its
right edge.
How is the trick done ? Look at the anno data, the third row output has
xsys = '7'; x=0.8; y = 0;

Function will remain BAR from the prior assignment, so a bar will be
drawn from the upper right (UR) corner of the first bar (because UR
was the second row) to the next corner at
current x + 0.8% of frame width - Huh? What ?
- coordinate system xsys='7' means _relative_ % of graphics output
area. x=0.8, so x change is relative to current x (from prior row
which is pixel position associated with midpoint)
y=0 (ysys coordinate system still '1') 0% of graphics output area
(which is the bottom of the frame)

So, the meat of the trick is changing coordinate systems mid-stride to
tweak the visual.
You would not be able to do this with the %BAR macro function that is
part of the annotate facility.

Thus, when you change the pattern to something other than solid, it
will be patterned into _two_ rectangles, and look ugly

Is there a fix ? Yes.
Use two annotate rows to position the first corner, and then a single
bar to 0,0.
The idea would be
MOVE to 100,my midpoint
MOVE to 100,0.8% relative
BAR to 0,0

Since you are drawing only one bar, there will be only one pattern and
less ugliness.

Try and code it up, and let me know if you get a better looking chart.

As for labelling with annotate, use the MOVE function to set a
position and TEXT to render it. The %LABEL macro simplifies this...
you can add this code to the step that creates your annotate data.

---
length text $40;

xsys='1';ysys='1';
%label(1,98,"Actual",black,0,0,2,Comic Sans MS,>);

xsys='1';ysys='1';
%label(95,98,"Forecast",black,0,0,2,Comic Sans MS,<);
--

Take note of the last parameter (> and <). This parameter is for the
POSITION feature that specifies how text is drawn relative to the
current x,y. The docs have a good picture explaining it all.

--
Richard A. DeVenezia
http://www.devenezia.com
Independent Consultant

On Tue, Sep 22, 2009 at 9:48 AM, Lane, Jim <jim.lane(a)rbc.com> wrote:
> You say X must correspond to the bar midpoints. I wonder if that
> explains something odd I've noticed working with your code. As written,
> if I set X to a midpoint value ('01jul2009'd for example) I get gray
> shading starting at the rightmost edge of the July 2009 bar and covering
> the otherwise white background of everything to the left of that.
> However if I change style='solid' to something like style='L3' I get the
> same area shaded with cross-hatch bars but with a gray line running up
> the centre of the July 2009 bar. That looks ugly. What would cause that
> do you think?
>
> As for low quality audiences, I think I should learn enough annotate to
> label the shaded and unshaded areas with text like 'Actual' and
> 'Forecast' which would explain it for them.
>
> Thanks for your help.
>
> /JL
>
> -----Original Message-----
> From: Richard DeVenezia [mailto:rdevenezia(a)gmail.com]
> Sent: 2009, September, 22 9:34 AM
> To: Lane, Jim
> Subject: Re: Re: Reference line on PROC GCHART output
>
> On Tue, Sep 22, 2009 at 7:20 AM, Lane, Jim <jim.lane(a)rbc.com> wrote:
>> Richard: thanks for this. When I ran your code on my system I get a
>> graph where the otherwise white background behind the bars is gray for
>
>> all the bars up to and including Oct 2005. Is that what you expected
>> it to do?
>
> That is the correct visual. I figured the different background would
> better pronounce the different time periods. It all depends on the
> audience though.
> The tricky part is the the annotate 'X' values, must correspond to the
> quarter midpoints.
>
>> I think this will give me what I'm after if I just change the hard
>> coded month value for x as required.
>
> Correct. The color can also be adjusted, look for CXrrggbb You could
> macroize the code to make it more reusable.
> If you have parameter for the 'transition date', you could use INTNX to
> ensure the parameter is tweaked to be year quarter-value, and thus match
> a midpoint.
>
>> BTW you wouldn't happen to know where this annotate facility is
>> documented for beginners such as myself? All the examples I've ever
>> seen dive right into it assuming a lot of background I don't have.
>
> Did you try the online help (F1) ?
> In Contents, drill to SAS Products/SAS Graph/Examples/Annotate
>
> You can also search the SAS-L archives at
> http://www.listserv.uga.edu/archives/sas-l.html
> or conference papers at
> http://www.lexjansen.com/sugi/
From: Arthur Tabachneck on
Jim,

Sneaky? I am reminded of something that I'm not sure if many of our
younger members have ever seen: a Rube Goldberg machine.

Just in case they're not, here is a link to one example:
http://www.youtube.com/watch?v=RouXygRcRC4

While they are definitely fun to watch, and program, sometimes it just
makes more sense to simply walk over to the light switch and turn it on
(or, in the case of the video, to walk over to the window and open the
curtain).

Art
---------
On Tue, 22 Sep 2009 07:11:03 -0400, Lane, Jim <jim.lane(a)RBC.COM> wrote:

>Hi, Art
>
>The sneaky approach. I love it. Seriously though, I'm producing graphs as
PDF files. How do I edit them?
>
>/JL
>
>-----Original Message-----
>From: Arthur Tabachneck [mailto:art297(a)NETSCAPE.NET]
>Sent: 2009, September, 21 4:09 PM
>To: SAS-L(a)LISTSERV.UGA.EDU; Lane, Jim
>Subject: Re: Reference line on PROC GCHART output
>
>Jim,
>
>Yes, SAS doesn't make it as easy to draw a reference line on the other
axis. And, if this is something you have to do to many graphs, annotate
is probably the way to go.
>
>However, if it is a one-off, you can always click on the graph, then
click on edit, and simply draw the desired line.
>
>Art
>-------
>On Mon, 21 Sep 2009 14:47:09 -0400, Lane, Jim <jim.lane(a)RBC.COM> wrote:
>
>>Art: thanks. Interesting. If I run that as is
>>
>>
>>proc gchart data=a;
>> vbar3d YEAR / sumvar=CNT discrete raxis=axis1
>> coutline=black cframe=yellow width=5
>> vref=30 inside=sum frontref;
>>
>>I get a reference line. If I change it to something closer to what I'm
>after
>>
>>proc gchart data=a;
>> vbar YEAR / sumvar=CNT discrete raxis=axis1
>> coutline=black cframe=yellow width=5
>> href=1999 inside=sum frontref;
>>
>>I don't get a reference line, just a warning message:
>>
>>WARNING: The reference line at 1999 on the vertical axis labeled CNT
>>SUM
>is out of range.
>>
>>How can that be given that YEAR ranges from 1997 to 2001? Also why does
>it say "vertical axis" when I asked for a horizontal axis?
>>
>>/JL
>>
>>-----Original Message-----
>>From: Arthur Tabachneck [mailto:art297(a)NETSCAPE.NET]
>>Sent: 2009, September, 21 2:39 PM
>>To: SAS-L(a)LISTSERV.UGA.EDU; Lane, Jim
>>Subject: Re: Reference line on PROC GCHART output
>>
>>Jim,
>>
>>Take a look at the example shown at:
>>http://support.sas.com/kb/24/868.html
>>
>>It describes how to combine vref=somevalue and frontref.
>>
>>Art
>>--------
>>On Mon, 21 Sep 2009 13:58:46 -0400, Lane, Jim <jim.lane(a)RBC.COM> wrote:
>>
>>>Hi, All
>>>
>>>I'm having trouble getting GCHART to co-operate. My program so far
>>>looks like this.
>>>
>>>axis1 value=(h=0.5) ;
>>>axis5 value=(h=0.5) label=none order=('01oct2000'd to '01oct2012'd by
>>>qtr); proc gchart data=work.c;
>>> vbar month / type=sum sumvar=x subgroup=c axis=axis1 maxis=axis5
>>>discrete ; run; quit;
>>>
>>>This is producing a vertical bar chart as I expect. My problem is that
>>>I would like to divide the chart somehow by drawing a vertical
>>>reference line so that the bars for months in the past lie to the left
>>>of the line and the future is to the right. I've tried to do this with
>>>options such
>>>as:
>>>
>>>href='01sep2009'd lref=2 cref=blue
>>>
>>>This produces neither a reference line nor an error message. What am I
>>>doing wrong here?
>>>
>>>-Jim Lane
>>>______________________________________________________________________
>>>_
>>>
>>>This e-mail may be privileged and/or confidential, and the sender does
>>not waive any related rights and obligations.
>>>Any distribution, use or copying of this e-mail or the information it
>>contains by other than an intended recipient is unauthorized.
>>>If you received this e-mail in error, please advise me (by return
>>>e-mail
>>or otherwise) immediately.
>>>
>>>Ce courrier �lectronique est confidentiel et prot�g�.
>>>L'exp�diteur ne
>>renonce pas aux droits et obligations qui s'y rapportent.
>>>Toute diffusion, utilisation ou copie de ce message ou des
>>>renseignements
>>qu'il contient par une personne autre que le (les) destinataire(s)
>>d�sign�
>>(s) est interdite.
>>>Si vous recevez ce courrier �lectronique par erreur, veuillez m'en
>>>aviser
>>imm�diatement, par retour de courrier �lectronique ou par un autre moyen.
>>_______________________________________________________________________
>>
>>This e-mail may be privileged and/or confidential, and the sender does
>not waive any related rights and obligations.
>>Any distribution, use or copying of this e-mail or the information it
>contains by other than an intended recipient is unauthorized.
>>If you received this e-mail in error, please advise me (by return
>>e-mail
>or otherwise) immediately.
>>
>>Ce courrier �lectronique est confidentiel et prot�g�.
>>L'exp�diteur ne
>renonce pas aux droits et obligations qui s'y rapportent.
>>Toute diffusion, utilisation ou copie de ce message ou des
>>renseignements
>qu'il contient par une personne autre que le (les) destinataire(s) d�sign�
>(s) est interdite.
>>Si vous recevez ce courrier �lectronique par erreur, veuillez m'en
>>aviser
>imm�diatement, par retour de courrier �lectronique ou par un autre moyen.
>_______________________________________________________________________
>
>This e-mail may be privileged and/or confidential, and the sender does
not waive any related rights and obligations.
>Any distribution, use or copying of this e-mail or the information it
contains by other than an intended recipient is unauthorized.
>If you received this e-mail in error, please advise me (by return e-mail
or otherwise) immediately.
>
>Ce courrier �lectronique est confidentiel et prot�g�. L'exp�diteur ne
renonce pas aux droits et obligations qui s'y rapportent.
>Toute diffusion, utilisation ou copie de ce message ou des renseignements
qu'il contient par une personne autre que le (les) destinataire(s) d�sign�
(s) est interdite.
>Si vous recevez ce courrier �lectronique par erreur, veuillez m'en aviser
imm�diatement, par retour de courrier �lectronique ou par un autre moyen.