BookmarkSubscribeRSS Feed
liuliugu
Calcite | Level 5

codes as below:

data a;

input year gdp cost;

cards;

1985   9016     192

1990   18668   290

1995   60794   637

2000   99215   1208

2005   183868  2475

2010   401512  5321

2014   636463  8082

2015   681015  8890

;

run;

proc sgplot data=a ;

vbar year/response=gdp ;

vline year/response=cost y2axis;

keylegend / location=inside;

run;

but I don't know how to display the number like  this.捕获.PNG

who can help me ? thanks.

1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12

Although you may want to do that, it is generally considered poor form for a graphic.  The numbers on the top distort the visual image (and impact) of the graphic.  Better to put the numbers below or in a separate table.  If you must do it (sometimes the boss insists!), this Google search will provide examples

bar chart numbers above site:sas.com

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1350 views
  • 0 likes
  • 2 in conversation