Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have two datasets that share the same x values, but each have different y values.

I would like to plot both on the same graph, however I do not want the secondary y-axis on the right side of the plot. I would like them staked where the x-axis resides in the middle and y1 is on the top and y2 is on the bottom.

Something similar to this stacked scatter plot

Simply put, I have 2 datasets sharing the same x value. I need them stacked on top of each other, regardless if the x-axis is on the bottom or in the middle. Both y1 and y2 are in different units so they cannot share the same y-axis nor be flipped to be negative

share|improve this question
    
You can't plot two different scales on the same axis. You have to use the secondary axis. –  Jesse Feb 6 '12 at 18:18

2 Answers 2

Insert -> Scatter -> Scatter with Smooth Lines and Markers will give you that type of graph

This does require the data to be next to each other e.g.:

XYY
1 1 2
2 2 4
3 3 6
4 4 8

Where column 1 is x-value and columns 2-# are the y-values

share|improve this answer
    
Thanks, however I need 2 different y-axes because my data is at two different magnitudes. –  Matthew Bilskie Feb 2 '12 at 19:23
    
If the X-axis is between the graphs, graph 1 will have to have negative y-values. Is that the problem? –  Raystafarian Feb 2 '12 at 19:25
    
Perhaps I am not being clear on my question. See the link I posted above for an example. Simply put, I have 2 datasets sharing the same x value. I need them stacked on top of each other, regardless if the x-axis is on the bottom or in the middle. Both y1 and y2 are in different units so they cannot share the same y-axis nor be flipped to be negative. –  Matthew Bilskie Feb 2 '12 at 19:30
    
Will Chart Tools -> Layout -> Axes -> Primary Vertical Axis -> Show Axis in Log Scale work? This will allow you to show the delta of each plot in logarithmic relation to one another and then you can just change the grid lines and tick mark settings –  Raystafarian Feb 2 '12 at 19:32
    
I appreciate it, but that will not work. My y1 data is elevation in meters and y2 is elevation error in centimeters and I must have them on top of each other. –  Matthew Bilskie Feb 2 '12 at 19:35

I have blogged about making similar charts. Perhaps you could adapt one of these to your data:

http://peltiertech.com/WordPress/growth-rates-in-a-panel-chart/

http://peltiertech.com/WordPress/broken-y-axis-in-excel-chart/

The X axis is kept at the bottom, and the separate Y axis scales are on opposite sides of the chart. But the data is not overlapping, and the Y axis scales on each side only cover the part of the chart filled with their data.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.