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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

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