Hi,
I am using Stata 17 and was using some python codes to plot some bar charts. Below is my code:
However, when I run the codes, I am greeted with an error message:
May I know what do I have to install in Stata to make Matplotlib work? I had run other codes except for Matplotlib and they run smoothly so I am not sure how to make it work.
Any help in this area would be appreciated. Thanks!
I am using Stata 17 and was using some python codes to plot some bar charts. Below is my code:
Code:
python: import os os.chdir("C:/Users/ngwee/OneDrive/INSEAD RA work") import pandas as pd df = pd.read_csv('start_date.csv') import matplotlib.pyplot as plt x = df['rec_start_dates'] y = df['unrate_rec_start'] plt.bar(x,y) plt.ylabel('Monthly Unemployment Rate(seasonally adjusted)') plt.xlabel('Months') plt.title("Unemployment at Recession Start dates") plt.bar(x, y, color='blue') plt.savefig("myplot.png") plt.show() end
Code:
--------------------------- StataSE-64 --------------------------- This application failed to start because it could not find or load the Qt platform plugin "windows" in "". Reinstalling the application may fix this problem. --------------------------- OK ---------------------------
Any help in this area would be appreciated. Thanks!
Comment