Solved
Contributor
Posts: 28

# 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?

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

## Re: 3 Y Axis

[ Edited ]

With some work, you can do something like this:

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

All Replies
Super User
Posts: 8,634

## 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,904

## 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.

Super User
Posts: 21,490

## Re: 3 Y Axis

You can also check here:

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,216

## Re: 3 Y Axis

[ Edited ]

With some work, you can do something like this:

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

Super Contributor
Posts: 294

## 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.

☑ This topic is solved.