Custom logarithmic axis scaling in matplotlib
问题 I'm trying to scale the x axis of a plot with math.log(1+x) instead of the usual 'log' scale option, and I've looked over some of the custom scaling examples but I can't get mine to work! Here's my MWE: import matplotlib.pyplot as plt import numpy as np import math from matplotlib.ticker import FormatStrFormatter from matplotlib import scale as mscale from matplotlib import transforms as mtransforms class CustomScale(mscale.ScaleBase): name = 'custom' def __init__(self, axis, **kwargs):