<div dir="ltr">It turns out for yscale, I need to use linthreshy not linthresh. Problem solved.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 22, 2020 at 11:45 PM Liang Wang <<a href="mailto:frank0734@gmail.com">frank0734@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I have a problem using 'symlog' when the range maximum is below 1e0=1. Perhaps I'm misusing it, possibly the linthresh option.</div><div><br></div><div>Example notebook: <a href="https://gist.github.com/liangwang0734/fde9a033c3d8788075589e2f9fd87f0c" target="_blank">https://gist.github.com/liangwang0734/fde9a033c3d8788075589e2f9fd87f0c</a></div><div><br></div><div>Sample code:</div><div>import numpy as np<br>import matplotlib as mpl<br>import matplotlib.pyplot as plt<br></div><div><br></div><div>def test(start):<br>    linthresh = 10**(start+1)<br>    tmp = np.logspace(start, start + 3, 20)<br>    tmp = np.hstack((-tmp[::-1], tmp))<br><br>    fig, ax = plt.subplots()<br>    ax.plot(tmp, marker='o')<br>    ax.set_yscale('symlog', linthresh=linthresh)<br>    ax1 = ax.twinx()<br>    ax1.plot(tmp, c='orange', ls='--')<br></div><div><br></div><div>test(0)  # OK, linear scale and symlog scale look different</div><div>test(-3) # iffy, linear scale and symlog scale look the same</div><div><br></div><div><div><img src="cid:ii_kfeuey2h0" alt="image.png" width="424" height="252" style="margin-right: 0px;"><br></div></div><div><br></div><div><div><img src="cid:ii_kfeufjs01" alt="image.png" width="401" height="252" style="margin-right: 0px;"><br></div></div><div><br></div><div><br></div></div>
</blockquote></div>