TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Creating publication-quality figures with Matplotlib

38 点作者 mandor超过 10 年前

5 条评论

sonium超过 10 年前
I use Matplotlib for my publications written in latex. Matplotlib can also render via a latex backend, which gives you then matching fonts and symbols in the text and figure by using something as simple as:<p>rc(&#x27;text&#x27;, usetex=True) matplotlib.rcParams[&#x27;text.latex.preamble&#x27;] = [&#x27;\\usepackage{siunitx}&#x27;]<p>Here is an example from my own publication, with 100% Matplotlib and latex:<p><a href="http://scitation.aip.org/content/aip/journal/apl/104/9/10.1063/1.4867908" rel="nofollow">http:&#x2F;&#x2F;scitation.aip.org&#x2F;content&#x2F;aip&#x2F;journal&#x2F;apl&#x2F;104&#x2F;9&#x2F;10.10...</a><p>A clear advantage using Matplotlib is reusability as opposed to the time needed to set the plotting parameters right for every single figure over and over. I would really recommend this kind of workflow to anyone in academic publishing.
评论 #9044082 未加载
评论 #9044632 未加载
评论 #9045269 未加载
pbsk超过 10 年前
Seaborn is now my goto plotting library for python. It&#x27;s built on Matplotlib but with default themes and colour palettes that are much better out of the box and rarely require modification.<p>It plays nicely with pandas dataframes and has a number of useful built-in plots.<p><a href="http://stanford.edu/~mwaskom/software/seaborn/" rel="nofollow">http:&#x2F;&#x2F;stanford.edu&#x2F;~mwaskom&#x2F;software&#x2F;seaborn&#x2F;</a> <a href="http://stanford.edu/~mwaskom/software/seaborn/tutorial/plotting_distributions.html" rel="nofollow">http:&#x2F;&#x2F;stanford.edu&#x2F;~mwaskom&#x2F;software&#x2F;seaborn&#x2F;tutorial&#x2F;plott...</a> <a href="http://stanford.edu/~mwaskom/software/seaborn/tutorial/timeseries_plots.html" rel="nofollow">http:&#x2F;&#x2F;stanford.edu&#x2F;~mwaskom&#x2F;software&#x2F;seaborn&#x2F;tutorial&#x2F;times...</a>
评论 #9045281 未加载
kevin_thibedeau超过 10 年前
Matplotlib is awesome. I just wish the API was cleaner:<p><pre><code> figure.set_frameon() axis.set_frame_on() pyplot.xlim() axis.set_xlim() </code></pre> This is really pain to deal with when you convert a plot into a subplot and have to switch to the different axis API. Some of this is damage from copying Matlab&#x27;s legacy but it could use a polish. If you don&#x27;t use an editor with IntelliSense you have to constantly look up methods in the docs to find the right spelling.
wodenokoto超过 10 年前
They look good, but the amount of code is staggering!
评论 #9044667 未加载
评论 #9044348 未加载
评论 #9044232 未加载
emp_zealoth超过 10 年前
Will there be any way to integrate it with Octave?