Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Is there a way to have a secondary y-axis in graph builder?

Topic Options

- Start Article
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 8, 2014 7:33 AM
(11757 views)

Graph builder is turning out to be a great tool that I'm using more and more lately.

I want to show two things simultaneously on this chart, as shown in the attachment:

1. Trend among means of the data (means taken within subgroups, with grouping variable on the x-axis) - with error bars to aid in interpretation.

2. As a further aid to interpretation, I want to show a histogram of the counts within each group, and for this I use a bar chart as shown in the attachment. But this is of course messing up the scale on my primary variable (the one I'm averaging and showing error bars on).

If I could put the bars on a different scale - like a secondary y-axis - that would eliminate this problem I believe. Is there a way to do that?

Thanks,

Charlie

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

7 REPLIES 7

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Is there a way to have a secondary y-axis in graph builder?

Well, can't open designer at the moment, but there are xaxis2 and yaxis2 commands available in GTL:

SAS/GRAPH(R) 9.2: Statistical Graphics Procedures Guide, Second Edition

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Is there a way to have a secondary y-axis in graph builder?

Thanks for the link.

I should have mentioned that the way I'm doing this now is that the graph builder is generated from a JSL script. I'd like to release this tool to users soon so it would be best if I can find a solution that is workable through a JSL script.

Will those commands be available to me in JSL scripting, or do I need to do something else for that?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Is there a way to have a secondary y-axis in graph builder?

Hi,

Sorry, never used that tech. However if you are able to produce graphs using base SAS in any shape or form then these would be available.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Is there a way to have a secondary y-axis in graph builder?

You can do that in Graph Builder. The feature is not prominent because it's not a data visualization best practice. See Dual Scaled Axes in Graphs: Are they ever the best solution? for a full discussion; the abbreviated reason is that the overlay suggests a correspondence of scales that usually doesn't exist.

If you still want to proceed, place two or more variables in the Y role in Graph Builder. Then right-click on the Y axis and there will be a contextual menu item called Move Right that let's you pick which variable to move to a right Y axis.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Is there a way to have a secondary y-axis in graph builder?

It sounds like that shoudl be a solution if I were talking about two different y variables. I was able to do that I can see what you mean about this not being a best practice for data visualization.

But what I'm trying to do is to show two different aspects of the same y variable. What I am trying to show is the trend in the data with error bars using Mean(points) and standard error for the error bar. Then I want to indicate along the bottom of the x-axis is the count (i.e., N) for that same variable. The chart shows the count within each subgroup bin just as I want it to, but it seems that I cannot make this move to the second axis, since it is not a diifferent variable per se, and thus has a different behavior.

Thanks,

Charlie

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Is there a way to have a secondary y-axis in graph builder?

That worked perfectly - thanks very much !