?axis says that this function has the logical parameter outer "indicating whether the axis should be drawn in the outer plot margin, rather than the standard plot margin". You could try two calls to it with different outer values.