BookmarkSubscribeRSS Feed
djrisks
Barite | Level 11

Hello,

 

When using hbarparm with SGPANEL, is there a way to ensure that each barwidth is exactly the same, similarly to what the output in SGPLOT looks like? In SGPANEL, I've adjusted the barwidth and also used the proportional option, and sometimes the barwidths look the same, however sometimes they are not. Please see the example below. You can see that the panel with only 1 record in it, has a slightly smaller width then the other panels. Also if I do not use the proportional statement then the panel with only 1 record has a much larger width then the other panels.

 

Barwidth.png

 

Many thanks in advance for your help!

 

Kriss

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

I woud imagine that you would need to specify the width of each output using one of the options, I don't know of the top of my head (haven't used sgpanel in ages).  You can however find many examples:

http://blogs.sas.com/content/graphicallyspeaking/

Just a search for hbparm results in many posts on the subject.

djrisks
Barite | Level 11
Thank you for this RW9, unfortunately, I could not see any similar posts on the blog.
Jay54
Meteorite | Level 14

I believe you have run into the special case for computation of bar widths when there is only one bar in the graph or cell.  I cannot think of any workaround for this at this time.

djrisks
Barite | Level 11

That's fine Sanjay, if I make the barwidths smaller then they do eventually become the same size. At the moment the Statistician is happy with the graph. Maybe in the future, there can be an option to have all the bars the same width.

 

Thank you.

Jay54
Meteorite | Level 14

Its a defect.  In future, it will be fixed.  Smiley Happy

djrisks
Barite | Level 11
Thank you 🙂

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
  • 6 replies
  • 1230 views
  • 2 likes
  • 3 in conversation