Home

Set were Y-axis crosses X-axis

%3CLINGO-SUB%20id%3D%22lingo-sub-1176108%22%20slang%3D%22en-US%22%3ESet%20were%20Y-axis%20crosses%20X-axis%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1176108%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20using%20a%20secondary%20Y-axis%20with%20a%20different%20scale%20than%20the%20primary.%20In%20the%20diagram%20there%20are%20both%20negative%20and%20positive%20values%20plotted.%26nbsp%3BThe%20result%20is%20that%20the%20X-axis%20crosses%20the%20secondary%20Y-axis%20at%20a%20value%20other%20the%20zero.%20This%20makes%20the%20diagram%20a%20bit%20difficult%20to%20read.%20Is%20there%20a%20way%20to%20force%20the%20X-axis%20to%20always%20cross%20both%20the%20primary%20and%20secondary%20Y-axis%20at%20zero%3F%20(meaning%20that%20zero%20are%20at%20the%20same%20level%2Fheight%20in%20the%20diagram%20for%20both%20scales)%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Diagram.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F171420iEB81CA02D187C251%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Diagram.png%22%20alt%3D%22Diagram.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1176108%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1176234%22%20slang%3D%22en-US%22%3ERe%3A%20Set%20were%20Y-axis%20crosses%20X-axis%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1176234%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F559370%22%20target%3D%22_blank%22%3E%40edvinana%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%2C%20isn't%20the%20purpose%20of%20having%20two%20axis%20to%20be%20able%20to%20show%20data%20series%20of%20different%20magnitudes%20in%20the%20same%20graphing%20area%3F%20If%20you%20really%20want%20to%20have%20-zero-%20at%20the%20same%20height%20on%20both%20axis%20you%20should%20have%20the%20relationship%20of%20both%20axis%20(minimun%20-%20zero%20-%20maximum)%20%26nbsp%3Band%20the%20number%20of%20gaps%20between%20grid%20lines%20exactly%20the%20same.%20In%20your%20case%2C%20the%20primary%20axis%20goes%20from%20-600%20to%20300%20in%209%20steps.%20Your%20secondary%20axis%20goes%20from%20-200%20to%201000%20in%206%20steps.%20I%20guess%20that%20when%20you%20set%20the%20maximum%20on%20your%20primary%20axis%20to%203000%2C%20and%20the%20gap%20width%20(%3Dmajorn%20unit)%20to%20600%2C%20that%20your%20horizontal%20axis%20will%20be%20at%20the%20same%20level%20on%20both%20verticals.%20But%20then%20you%20might%20not%20like%20what%20you%20get%20either.%20Having%20both%20series%20on%20the%20same%20axis%20would%20be%26nbsp%3Bpreferable%2C%20I%20believe.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1176238%22%20slang%3D%22en-US%22%3ERe%3A%20Set%20were%20Y-axis%20crosses%20X-axis%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1176238%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F559370%22%20target%3D%22_blank%22%3E%40edvinana%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI've%20seen%20somewhere%20macro%20to%20align%20axis%2C%20didn't%20google%20for%20it%20now.%20Otherwise%20that's%20only%20reformat%20axis%20manually%2C%20but%20to%20do%20that%20each%20time%20when%20source%20data%20changes.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1176263%22%20slang%3D%22en-US%22%3ERe%3A%20Set%20were%20Y-axis%20crosses%20X-axis%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1176263%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20using%20the%20same%20typ%20of%20diagram%20for%20several%20different%20cases%20and%20all%20other%20diagram%20starts%20with%20zero%20(no%20negative%20values)%2C%20so%20this%20is%20the%20only%20one%20with%20this%20issue.%20And%20normally%20the%20magnitudes%20differs%20more%20the%20ten%20times.%20I%20also%20like%20have%20the%20same%20structure%20for%20all%20diagrams.%20But%20as%20you%20pointed%20out%20the%20magnitud%20for%20all%20series%20can%2C%20in%20this%20case%2C%20be%20presented%20in%20the%20same%20scale.%20So%20in%20order%20to%20keep%20the%20same%20structure%20I%20have%20now%20set%20the%20primary%20and%20secondary%20scale%20to%20the%20same%20max%2Fmin%20that%20envelope%20all%20series.%20This%20looks%20way%20better!%3C%2FP%3E%3CP%3EReally%20a%20obvious%20solution%20but%20I%20couldn't%20see%20the%20forest%20for%20all%20the%20trees.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hello,

 

I'm using a secondary Y-axis with a different scale than the primary. In the diagram there are both negative and positive values plotted. The result is that the X-axis crosses the secondary Y-axis at a value other the zero. This makes the diagram a bit difficult to read. Is there a way to force the X-axis to always cross both the primary and secondary Y-axis at zero? (meaning that zero are at the same level/height in the diagram for both scales) 

 

Thanks!

 

 

Diagram.png

3 Replies
Highlighted

@edvinana 

But, isn't the purpose of having two axis to be able to show data series of different magnitudes in the same graphing area? If you really want to have -zero- at the same height on both axis you should have the relationship of both axis (minimun - zero - maximum)  and the number of gaps between grid lines exactly the same. In your case, the primary axis goes from -600 to 300 in 9 steps. Your secondary axis goes from -200 to 1000 in 6 steps. I guess that when you set the maximum on your primary axis to 3000, and the gap width (=majorn unit) to 600, that your horizontal axis will be at the same level on both verticals. But then you might not like what you get either. Having both series on the same axis would be preferable, I believe.

Highlighted

@edvinana 

I've seen somewhere macro to align axis, didn't google for it now. Otherwise that's only reformat axis manually, but to do that each time when source data changes.

Highlighted

@Riny_van_Eekelen 

I'm using the same typ of diagram for several different cases and all other diagram starts with zero (no negative values), so this is the only one with this issue. And normally the magnitudes differs more the ten times. I also like have the same structure for all diagrams. But as you pointed out the magnitud for all series can, in this case, be presented in the same scale. So in order to keep the same structure I have now set the primary and secondary scale to the same max/min that envelope all series. This looks way better!

Really a obvious solution but I couldn't see the forest for all the trees.

 

Thanks.

Related Conversations
X+1 +1 +1... till match a condition
Deleted in Excel on
7 Replies