I am seeking a reference that will help me create what I believe is called a "positive-negative" bar chart (although I'm not sure). Here's an example visual I found on the web at http://beatexcel.com/positive-negative-bar-chart/ .
In the SAS documentation I found this reference (specifically the BASELINEINTERCEPT statement) https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=grstatgraph&docsetTarget=...
But this is not helpful to me because I prefer/need to do SGPLOT or other SAS Graphics procedures rather than this if possible.
This is a sample dataset I'm trying to graph in this way.
data have;
input day $ value ;
datalines;
Wednesday 1.13203258
Tuesday 1.055489878
Thursday 0.050301811
Monday -0.145520643
Saturday -0.281669589
Sunday -0.281669589
Friday -1.360262415
;
Basic HBAR for the data shown:
proc sgplot data=have; hbar day /response=value; run;
And possible order control using the categoryorder option.
proc sgplot data=have; hbar day /response=value categoryorder=respdesc; run;
Basic HBAR for the data shown:
proc sgplot data=have; hbar day /response=value; run;
And possible order control using the categoryorder option.
proc sgplot data=have; hbar day /response=value categoryorder=respdesc; run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: