• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

how to align X axis to Y=0 on 2 Y axes where Y axes have diff scales?!

cjw

New Member
I need to
1) align the X axis to 0 on 2 Y axes
2) scale the 2 Y axes so that 10 degrees Celsius on the primary Y axis (left side) = 20 mm precipitation on the secondary Y axis (right side) (in my chart below, I've managed to do this, but my two Y axis are no longer aligned at zero)
3) not display negative values for secondary Y axis (min is zero) - but to align, I have had to enter a negative value as the min.
I found John Peltier had some info on this at http://peltiertech.com/Excel/Charts/AlignXon2Ys.html
but I have not tried creating any VBA macros and am also not sure whether this would help for this kind of chart/problem.
Does anyone have experience solving this kind of problem? this is hard!
My data is attached...


upload_2014-3-29_15-15-8.png
 

Attachments

  • WRCC_mazama_temp-precip-2012.xlsx
    15.5 KB · Views: 5
Hi ,

I am not sure what is your problem ; can you take a look at this uploaded file and comment ?

Narayan
 

Attachments

  • WRCC_mazama_temp-precip-2012.xlsx
    15.4 KB · Views: 10
Hi,
Thanks for your speedy reply and attractive chart! On the exampleyou uploaded, the Y values of zero need to appear on the same horizontal line, and 10 degrees C on the left/primary vert axis needs to be on the same horizontal line as 20 mm precipitation. See chart below - this may explain better than my description.

You had kindly offered advice on this kind of line chart several weeks previously, when I was trying to figure out how to fill in areas beneath lines. I didn't realize my first problem would be to align the primary and secondary Y axes!
Walter-temp-precip-2.jpeg
Thanks for considering how to solve this - I really appreciate your help!
 
Hi - This is WONDERFUL - high point of my weekend!... would you be so kind as to explain to me how you derived the values for the min and max on the primary & secondary axes? I need to do several more of these with different data sets and want to be able to replicate what you've done.
p.s. - you ARE an Excel Ninja.
 
Hi ,

You are too generous ! The graph you uploaded has a secondary axis scale which is twice that of the primary axis.

You can set the limits based on this ; for the secondary axis , there is only one negative value , and this has been hidden by putting in a shape. You can click in that region and see the shape.

Narayan
 
Hi - thank you for the info. forcing 0 alignment across 1st and 2nd Y axis manually makes sense. How can we have excel dynamically set this relationship vs manual?
 
Back
Top