def test_logscale_transform_repr(): # check that repr of log transform succeeds fig, ax = plt.subplots() ax.set_yscale('log') s = repr(ax.transData) # check that repr of log transform succeeds s = repr(Log10Transform(nonpos='clip'))
def test_logscale_invert_transform(): fig, ax = plt.subplots() ax.set_yscale('log') # get transformation from data to axes tform = (ax.transAxes + ax.transData.inverted()).inverted() # direct test of log transform inversion assert isinstance(Log10Transform().inverted(), InvertedLog10Transform)
def test_logscale_transform_repr(): fig, ax = plt.subplots() ax.set_yscale('log') repr(ax.transData) # check that repr of log transform succeeds # check that repr of log transform succeeds with pytest.warns(MatplotlibDeprecationWarning): repr(Log10Transform(nonpos='clip'))
def test_logscale_transform_repr(): # check that repr of log transform succeeds fig, ax = plt.subplots() ax.set_yscale('log') s = repr(ax.transData) # check that repr of log transform returns correct string s = repr(Log10Transform(nonpos='clip')) assert s == "Log10Transform({!r})".format('clip')