Hi All,
I try to create the two-scale graph(see attached). I wonder if someone has already done it before.
If yes, could share your SAS code here?
Thanks a lot.
Ethan
You should provide some example of what your data looks like. Sometimes you need to modify the data structure or add variables to get desired results.
The Proc Sgplot has this example:
proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d and date <= "01jan2001"d and stock = "IBM")); title "Stock Volume vs. Close"; vbar date / response=volume; vline date / response=close y2axis; run; title;
The VBAR to be closer to the example would have a group=variablename , where variable name would be the one holding the values of the August or whatever time period, and groupdisplay=cluster for the side-by-side bars.
You should have the sashelp.stocks data set included in your installation.
I am assuming you really don't want the picture of the advertisement in the middle of your graph.
Thanks for your example of code and suggestion.
Here is the sample of data with Excel format.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
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.
Ready to level-up your skills? Choose your own adventure.