当使用matplotlib 2.0.2,python2.7,Win7,64bit创建直方图时,我在bin之间得到垂直条纹,在pdf和png中都可见.我使用latex来创建PDF,我将在pdflatex文档中使用includegraphics.创建的PNG只是一个快速检查.
在Matplotlib 1.5.3中并非如此.如何摆脱分隔各个箱子的这些白线?
事情尝试:
用于生成图像的代码
import matplotlib as mpl
mpl.use('pgf')
pgf_with_latex = { # setup matplotlib to use latex for output
"pgf.texsystem": "pdflatex", # change this if using xetex or lautex
"text.usetex": True, # use LaTeX to write all text
"font.family": "serif",
"font.serif": [], # blank entries should cause plots to inherit fonts from the document
"font.sans-serif": [],
"font.monospace": [],
"axes.labelsize": 10, # LaTeX default is 10pt …Run Code Online (Sandbox Code Playgroud)