<div dir="ltr"><div><div>Dimitri,<br></div><div><br></div><div>Although there is no explicit 'log axis' argument that contour accepts, you can use this:<br></div></div><div><br></div><div>plt.contourf(f_psd_welch, traverseCoord, 10*np.log10(psd_hotwire_FS_welch))<br>plt.gca().set_xscale('log')<br>plt.xlim([np.min(f_psd_welch[1:]), np.max(f_psd_welch[1:])])<br><br></div>Ian<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 24 November 2017 at 20:03, dimitrif <span dir="ltr"><<a href="mailto:df388@cam.ac.uk" target="_blank">df388@cam.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ian,<br>
<br>
Amazing, thank you very much for your help! Now, it works as expected.<br>
<br>
I actually got the following warning 'RuntimeWarning: divide by zero<br>
encountered in log10' when running the script but I couldn't connect it to<br>
the outcome. Sometimes a new pair of eyes and a fresh mind helps to solve<br>
the issue in a few seconds.<br>
<br>
Sounds logically for me that changing the library would not be necessary. I<br>
wonder why contourf does not have the option to switch the axes to log<br>
similar to loglog or semilogx? That would look much nicer and save a lot of<br>
time adjusting the axes of contourf.<br>
<br>
Dimitri<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
--<br>
Sent from: <a href="http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html" rel="noreferrer" target="_blank">http://matplotlib.1069221.n5.<wbr>nabble.com/matplotlib-users-<wbr>f3.html</a><br>
______________________________<wbr>_________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/matplotlib-<wbr>users</a><br>
</div></div></blockquote></div><br></div>