BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fastb
Fluorite | Level 6

I am creating a comparative histogram (pic attached) in proc univariate and my class variable is entry (entry has two values, A and B).

The labels that are placed to the left of each histogram say "entry = A' and 'entry = B'.  How can I modify these so they only say 'A' and 'B' and leave off the 'entry = '.  I can't find anything online that says how to modify these.  The code that I am using is posted below:

 

proc univariate data=results noprint;

class entry;

var result;

histogram result / odstitle = 'Analyte' vscale=percent nocurvelegend normal(noprint);

run;


Histogram9.png
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

If you want more control over graph appearance than Proc Univariate provides then you might want to try using Proc Sgpanel

 

Which version of SAS are you using?

 

I don't get the variable name in the label as you do attempting your code structure with one of my datasets.

View solution in original post

3 REPLIES 3
ballardw
Super User

If you want more control over graph appearance than Proc Univariate provides then you might want to try using Proc Sgpanel

 

Which version of SAS are you using?

 

I don't get the variable name in the label as you do attempting your code structure with one of my datasets.

Ksharp
Super User

proc sgpanel data=sashelp.class;
 panelby sex/layout=rowlattice rowheaderpos=left novarname spacing=4;
 histogram weight;
 density weight;
run;

fastb
Fluorite | Level 6

Thank you ballrdw and ksharp! I will use sgpanel instead of proc univariate to make these.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2044 views
  • 0 likes
  • 3 in conversation