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: 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!

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
  • 1 reply
  • 744 views
  • 0 likes
  • 2 in conversation