I have a Pandas framework and try to save the chart in a png file. However, it seems that something is not working properly. This is my code:
import pandas import matplotlib.pyplot as plt import seaborn as sns sns.set(style='ticks') df = pandas.read_csv("this_is_my_csv_file.csv") plot = sns.distplot(df[['my_column_to_plot']]) plot.savefig("myfig.png")
And I have this error:
AttributeError: 'AxesSubplot' object has no attribute 'savefig'
python matplotlib pandas seaborn
Tasos Jan 12 '16 at 9:34 2016-01-12 09:34
source share