BookmarkSubscribeRSS Feed
Veeresh
Fluorite | Level 6

 

I working on PROC NETDRAW PROCEDURE. 

 

I am facing challenge to reverse the arrowhead towards Right to left (<------------). Currently the netdraw printing arrowhead left to the right direction(--------->). 

 

How to reverse the arrowhead ??? 

 

----------> CURRENT ARROWHEAD. 

 

<--------- REVERSE THE ARROWHEAD -Expected output. 

 

 

I have attached the image for reference.

3 REPLIES 3
ballardw
Super User

It is always a good idea to show your current code. That way we know which options you are currently using that may affect output.

Better is to include some example data that exhibits the current behavior. That way we can actually test proposed code. Post the code of the procedure and data step code that creates example data into a code box opened with either the </> or "running man" icon on the forum to preserve formatting, and in the case of data step datalines values, ensure the code will run properly.

 

Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the </> icon  to show exactly what you have and that we can test code against.

lipury
SAS Employee

Hi!

Can you reverse the "from" and "to" fields in your input to proc. NETDRAW?

Lindsey

sasgac
SAS Employee

There are a few ways that I can think of to do this.

The easiest way to do this would be to swap the ACTIVITY and SUCCESSOR variables like what has been suggested. If you are using the default variables _FROM_ and _TO_ you would need to rename these accordingly.

 

Another way would be to use the Layout data set, which you can output using the LAYOUT= option in the ACTNET statement. For more details, see the "Layout Data Set" and "Controlling the Layout" in the details section.

https://go.documentation.sas.com/?docsetId=orpmug&docsetTarget=orpmug_netdraw_details07.htm&docsetVe...

https://go.documentation.sas.com/?docsetId=orpmug&docsetTarget=orpmug_netdraw_details08.htm&docsetVe...

 

A third option would be to use the Annotate facility that Netdraw supports. You would likely need
to specify ARROWHEAD=0 in the ACTNET statement to suppress the default arrowhead. While this approach provides more customization capabilities, it also would require a bit more effort.

Hope this helps.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 610 views
  • 0 likes
  • 4 in conversation