Data visualization with SAS programming

3 Y Axis

Accepted Solution Solved
Reply
Contributor
Posts: 24
Accepted Solution

3 Y Axis

Hi,

Is it possible to create a third Y axis (one on right, two on left of the graph) with gplot or sgplot or any SAS graph procedure?

 

Thanks for your help 


Accepted Solutions
Solution
‎11-17-2016 11:31 AM
SAS Super FREQ
Posts: 1,081

Re: 3 Y Axis

[ Edited ]

All Replies
Esteemed Advisor
Esteemed Advisor
Posts: 7,251

Re: 3 Y Axis

Generally speaking, I wouldn't imagine it being a good idea.  However without any refrence to how you want it to look its hard to say.  You could just overlay a line plot going up the Y axis with datalabels showing the additional data you want, i.e if your x goes 0-10, and y 1-5, then do x values 0.5, 1, 2, 3..., and overlay a line plot with values 1-5 and datalables on., would look like an axis then.

Here is a good site for graphs, and examples.

http://blogs.sas.com/content/graphicallyspeaking/

 

SAS Super FREQ
Posts: 3,418

Re: 3 Y Axis

No, not automatically.

 

If you want to go "old school," you can use an affine transformation to transform the Y3 values to one of the other scales, then use annotation to put your own Y3 axis inside the plot area.

 

Another option is to show the data by using a paneled display instead of an overlay.  You can use the SGPANEL procedure to create multiple plots that each have their own scale. You would use the UNISCALE= option in teh PANELBY statement to allow scales to float between panels.

Grand Advisor
Posts: 17,428

Re: 3 Y Axis

You can also check here:

 

http://robslink.com/SAS/Home.htm

 

I recall seeing graphs with two Y axis, but not three. 


GTL is always an option. 

Solution
‎11-17-2016 11:31 AM
SAS Super FREQ
Posts: 1,081

Re: 3 Y Axis

[ Edited ]

With some work, you can do something like this:  

3_Y_Axes.png

 

http://blogs.sas.com/content/graphicallyspeaking/2012/01/16/the-more-the-merrier/

Super Contributor
Posts: 291

Re: 3 Y Axis

Although you can, should you? Generally not - it leads to reader confusion. If the idea is to maximize the use of "real estate" (fewer pages), there's usually no reason why 2 or three smaller charts on a single page can't be used.

See https://www.perceptualedge.com/articles/visual_business_intelligence/dual-scaled_axes.pdf

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 270 views
  • 3 likes
  • 6 in conversation