BookmarkSubscribeRSS Feed
ciro
Quartz | Level 8

hello,

I would like to learn a way to draw a tree graph as the one attached.

As you can see the first node represents a total and the other child nodes various subtotals.

I would have the possibility:

  1. to label each node (e.g Total1, Subtotal1,Subtotal2 etc..)
  2. To add a value for  the variable in each node
  3. To add another variable which represents the share of the variable over the overall total.
  4. To have each form colored, possibly based on a palette of colors

 

So there are two issue:

  1. how the dataset should be designed?
  2. are there procedures to draw such a graph?

 

Any suggestions, tips, codes are greatly appreciated

 

thank you very much in advance

1 REPLY 1
Rick_SAS
SAS Super FREQ

the tree (without labels) is called a dendrogram. Here is an example of how to use the DENDROGRAM statement in the Graph Template Language (GTL).

 

I don't have an opinion about the best way to add the labels. Others will offer their advice.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 811 views
  • 0 likes
  • 2 in conversation