Make auto graph margins label and tick aware
Currently the graph margins set to 'auto' do not care if a label and if/where the axis ticks are placed. I often create graphs where I switch the left axis ticks off and may not even show a label in some cases. I have attached a test graph with the label switched off and the tick location set to 'inside' (for dramatic effect I have also set the major tick length to 20). With the auto margins this creates a fairly big empty region, and I need to set the margins manually to get a neat result. It would be great if the auto margins would change according to the state of the Labels (off / empty = no added space or on / not empty) and tick Location settings (off / inside = no added space or outside).
That has a lot of empty space on the left. Can you share the recreation macro?
October 11, 2020 at 12:38 pm - Permalink
Sure, here it is (I don't have the experiment file with the exact graph anymore, but this gives basically the same result):
PauseUpdate; Silent 1
Display /W=(560,60,840,280) test
ModifyGraph tick(left)=2
ModifyGraph mirror=2
ModifyGraph minor=1
ModifyGraph noLabel(left)=2
ModifyGraph standoff=0
ModifyGraph btLen(left)=20
EndMacro
October 11, 2020 at 05:36 pm - Permalink