11-03-2012 06:09 PM
When displaying data values(positive or negative) using BARS ( outside/inside), they get displayed on the top of the bar.
For positive values, its fine.... but for negative values, I wanted to display them at the bottom of the bar. (as shown by arrow in below image)..
Is this possible without using annotate?
11-05-2012 10:52 AM
First step would be to desribe how you are creating the current graph, especially with code. Answers likely differ if you are using classic graphing procs such as GCHART or GPLOT, the statistica graphics plots, SGPLOT or graphics template language.
11-05-2012 11:08 AM
It's a valid question, but I don't see a way to do it without using annotate . If you had all by the axis that might be easier, but to have positive at (top inside) and negative at (bottom inside).
11-05-2012 11:14 AM
One way would be to use PROC TEMPLATE (see code example below)
do i = -10 to 10 by 2;
x = i;
y = i* 2+x;
define statgraph labels;
dynamic X Y;
layout lattice ;
barchart x = X y = Y / barlabel=true;
proc sgrender data = have template = labels;
dynamic X = "X" Y = "Y";
Best of luck!
11-06-2012 01:32 PM
Thank you all for your replies..
I am using gchart and gbarline.
I tried using proc template... I get errors at words ..dynamic , begingraph.......
11-06-2012 01:43 PM
What kind of errors?
What SAS version are you using?
Just because the words are in red, it doesn't mean an error.
(just to clarify)
Also, the code I posted above has a missing ";" after the run statement that creates the data set have.