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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 1409 views
  • 0 likes
  • 2 in conversation