It doesn't show scatter plot but it says: "<Figure size 640x480 with 1 Axes>" - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: It doesn't show scatter plot but it says: "<Figure size 640x480 with 1 Axes>" (/thread-21688.html) |
It doesn't show scatter plot but it says: "<Figure size 640x480 with 1 Axes>" - dcardonaa - Oct-10-2019 Hello everyone! I'm trying to run this code for getting a scatter plot with green dots but it doesn't show the plot. I really appreciate some help! import pandas as pd import matplotlib.pyplot as plt #Reading sales data sales_df=pd.read_csv('BigMartSalesData.csv') #print(sales_df['InvoiceNo']) #Grouping by Invoice Numbers to find the range with the highest concentration of amounts Inv_am=sales_df.groupby('InvoiceNo').sum()['Amount'] #print(Inv_am.values) plt.scatter(Inv_am.index, Inv_am.values, color='g') plt.xlabel=('Invoice') plt.ylabel=('Amount') plt.title=('Amount in sales by Invoice') plt.show()
|