我正在使用google collab生成一些图形,该图形曾经用于填充100%的内部区域,但是今天它具有内部填充,我该如何解决?
year = ['2006', '2007', '2008', '2009', '2010', '2011', '2012', '2013', '2014', '2015', '2016', '2017', '2018']
memory_related = [70, 75, 77, 82, 79, 69, 65, 70, 83, 70, 70, 78, 67]
non_memory_related = [100-x for x in memory_related]
cve_reported_problems = pd.DataFrame(
{'Year': year,
'Memory related issues': memory_related,
'Other issues': non_memory_related
})
cve_reported_problems.plot.area(x='Year', figsize=(12, 4)).get_figure().savefig('ramissues.pdf')
答案 0 :(得分:1)
尝试一下:
plot = cve_reported_problems.plot.area(x='Year', figsize=(12, 4))
plot.autoscale(tight=True)
plot.get_figure().savefig('ramissues.pdf')