I'm trying to make a plot with two y-axes, one of them logarithmic and one linear, using host_subplot from mpl_toolkits.axes_grid1. The figure looks ok, with the exception of the minor ticks from the secondary y-axis (right) being also displayed on the primary y-axis (left), on the inside of the figure.
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import host_subplot
import mpl_toolkits.axisartist as AA
host = host_subplot(111)
host.set_yticks(np.arange(-12, -3, 1.0))
par1 = host.twinx()
par1.set_ylim( 2.7040e+3, 1.3552e+7)
par1.set_yscale('log')
minorLocator_x1 = MultipleLocator(0.3333)
minorLocator_y1 = MultipleLocator(0.5)
host.xaxis.set_minor_locator(minorLocator_x1)
host.yaxis.set_minor_locator(minorLocator_y2)
I can fix the mirrored minor logarithmic axis ticks by using:
host = host_subplot(111, axes_class=AA.Axes)
However, this creates another problem, namely that the x-axis tick labels are displayed on the inside of the figure, just as the x-axis label is too.
Any ideas on how to circumvent the problems?