BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
PSIOT
SAS Employee

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 

1 ACCEPTED SOLUTION

Accepted Solutions
5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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/

 

Rick_SAS
SAS Super FREQ

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.

Reeza
Super User

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. 

Jay54
Meteorite | Level 14

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/

Bill
Quartz | Level 8

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 5 replies
  • 4265 views
  • 3 likes
  • 6 in conversation