I have ploted a simple picture. But when the format of the saved figure is svg, then I open it in visio, and the grid line would not be shown as it shows in Python. The other saved formats, PDF, png, jpf have the normal grid lines, which is same as they show in Python.
import numpy as np import matplotlib.pyplot as plt import seaborn as sns x = np.arange(10) y = x**2 plt.plot(x, y) plt.grid('on') plt.savefig("pic.svg") # plt.savefig("pic.pdf") plt.show()
As suggested by HS-nebula, the saved svg has the gridlines in Word. But I want to edit it. Why the gridlines don't apper in visio?
https://stackoverflow.com/questions/66889800/saved-svg-generated-by-matplotlib-does-not-show-gridlines-in-visio March 31, 2021 at 10:28PM
没有评论:
发表评论