2
我試圖在安德魯斯情節中繪製一些國家的數據,但數字'1e12'不斷顯示在右上角,我不知道爲什麼它存在或如何擺脫它。這裏是情節本身:安德魯斯繪製在角落裏的隨機數字
這是我用來做它的代碼,非常標準的安卓劇情:
import pandas as pd
import matplotlib.pyplot as plt
from pandas.tools.plotting import radviz
from pandas.tools.plotting import table
from pandas import read_csv
from pandas.tools.plotting import andrews_curves
import os
filepath ="/Users/.../DefenseAndrews.csv"
os.chdir(os.getcwd())
os.getcwd()
dc = read_csv(filepath,
header=0, usecols=['Country','GDP','ME','GE','Trade','PopDensity'])
plt.figure()
andrews_curves(dc, 'Country')
plt.legend(loc='best', bbox_to_anchor=(1.0, 4.3))
plt.savefig('figure4_AndrewsPlot.eps', format='eps', dpi=1200)
plt.show()
我以前的解決方案是剛剛打開保存並手動刪除它在藝術節目中。但是,現在我必須創建圖像作爲一個eps文件,我不能在事後編輯。任何幫助或建議將不勝感激。
請至少提供您的csv文件的片段 –