Hi,
I have a "Region_Location" on the X axis, and All HIV Cases, as wells reported HIV Cases which I want to be the frequency for the data, on the y axis. I would like to plot, for each location, the reported cases inside of a bar that has all the cases. So, for example, I can simply plot all the cases, for each region, like this:
Libname SasData '/folders/myfolders/SASData' ;
Title "Reported AIDS Cases and All Estimated Persons Living with AIDS" ;
pattern1 value=empty ;
Proc gchart Data=SasData.HIV_Surveillance ;
Label Residence_Location = 'Residence Location' ;
Vbar Residence_Location / freq=All_Cases ;
run ;
quit ;
But I want to actually have, with a different pattern, pattern1 = empty, Pattern2 = R3, etc... the Reported cases inside the bar for all the cases. How do I do this. Nothing I have tried has worked so far . Thanks!
Below is the data file:
------------------------------------
/*HIV Surveillance Data 2014*/
Libname SasData '/folders/myfolders/SASData' ;
Data SasData.HIV_Surveillance ;
Input Residence_Location & $20.
Reported_Cases : 8.
All_Cases : 8. ;
Datalines ;
Atlanta 6355 14776
Baltimore 3490 10176
Boston 2769 9334
Chicago 5030 16037
Dallas 3312 9685
Detroit 1869 5289
Ft. Lauderdale 3218 9310
Houston 5034 13516
Los Angeles 7795 26799
Miami 4116 14399
Nassau 1190 3682
New Haven 873 4240
New Orleans 1558 4652
New York 16046 66528
Newark 2435 7282
Orlando 1909 5555
Philadelphia 4150 14467
Phoenix 1756 4737
San Diego 1664 7327
San Francisco 2352 11264
San Juan 1829 6975
Tampa Bay 2118 6199
Washington DC 6440 19128
W.Palm Beach 1347 4991
;
---------------------------------------
SORRY.. THIS POST SHOULD READ: PLOTTING MULTIPLE BAR CHARTS INSIDE EACH OTHER If that is not possible, I could also plot them next to each other.
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 25. 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.