BookmarkSubscribeRSS Feed
smajid
Obsidian | Level 7

Hi Guys,

I need to do the following:

  • add one horizontal dotted line across the mid point of my bar plot
  • add a background color to my bar plot

Any suggestions on how I could achieve this..

Thx!

3 REPLIES 3
toconero
Fluorite | Level 6

I post the link where in support http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#a003199396.htm 

 

The code could be like this:

 

proc sgplot data=want;
   title "Stock Volume vs. Close";
   vbar x/ response=volume;
   vline y / response=close y2axis;
run;

 

Here it's the documentation about vline:

http://support.sas.com/documentation/cdl/en/grstatproc/67909/HTML/default/viewer.htm#p13y2w8p29m5ern...

to change the color you should use / limitattrbs=(color=< color whatever you want>);

 

 

I hope it could hep you!

 

DanH_sas
SAS Super FREQ

I have a couple of questions before I can answer your question:

1. What SAS version are you using?

2. When you say, "line across the mid point", are you talking about a reference line?

 

Thanks!
Dan

smajid
Obsidian | Level 7

I am using SAS Studio, and yes I meant reference line.

 

Thanks, Dan!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1166 views
  • 1 like
  • 3 in conversation