BookmarkSubscribeRSS Feed
dchaubey1
Calcite | Level 5

How i can create a box plot for all the character variable. 

For sashelp.cars I want to  see the distribution of INVOICE with respect to all the character variable such as MAKE, MODEL, TYPE, ORIGIN and DriveTrain. Here i want to create a boxplot to find the distribution. 

3 REPLIES 3
MarkusWeick
Barite | Level 11

Hi @dchaubey1,

do you want to have all the character variables in one box plot, or one box plot per variable?

Please keep the community friendly.
Like posts you agree with or like. Mark helpful answers as “accepted solutions”. Generally have a look at https://communities.sas.com/t5/Getting-Started/tkb-p/community_articles
Stu_SAS
SAS Employee

Hey @dchaubey1! There are a few ways you can visualize categories with box plots. If you want to simply break out your data by a single category, then the category data role is what you want:

Stu_SAS_1-1658150954926.pngStu_SAS_0-1658150926793.png

If you want to visualize it by multiple categories, such as a matrix of box plots, you want to use the lattice rows or lattice columns data roles:

 

Stu_SAS_3-1658151138841.pngStu_SAS_4-1658151155026.png

 

 

You can even add categories to your lattice roles:

 

Stu_SAS_5-1658151280917.pngStu_SAS_6-1658151324573.png

 

 

 

MarkusWeick
Barite | Level 11

Hi @dchaubey1,

alternatively you could use an "calculated item" to concatenate the different character variables and then do a box plot with the "calculated item" as category.

So you could have all in one box plot, though with many combinations this may be a confusing picture.

Best

Markus

Please keep the community friendly.
Like posts you agree with or like. Mark helpful answers as “accepted solutions”. Generally have a look at https://communities.sas.com/t5/Getting-Started/tkb-p/community_articles

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 498 views
  • 2 likes
  • 3 in conversation