Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fix this?
#1
I have the following codes:

import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
import pandas as pd
import statsmodels.api as sm
sns.set_style("darkgrid")
mpl.rcParams['figure.figsize'] = (20,5)

But I get the following errors:

--------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[2], line 19
16 # statsmodels.api for specifying models using formula strings and DataFrames.
18 sns.set_style("darkgrid")
---> 19 mpl.rcParams['figure.figsize'] = (20,5)

NameError: name 'mpl' is not defined
Larz60+ write Dec-26-2023, 03:09 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply


Messages In This Thread
How to fix this? - by James_S - Dec-25-2023, 08:51 PM
RE: How to fix this? - by deanhystad - Dec-26-2023, 04:43 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020