HOME/Articles/

matplotlib example imports (snippet)

Article Outline

Python matplotlib example 'imports'

Modules used in program:

  • import warnings
  • import matplotlib.pyplot as plt
  • import pandas as pd
  • import numpy as np

python imports

Python matplotlib example: imports

# Basic
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import rcParams
from matplotlib.cm import rainbow
%matplotlib inline
import warnings
warnings.filterwarnings('ignore')

# Other libraries
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler

# Machine Learning
from sklearn.neighbors import KNeighborsClassifier
from sklearn.svm import SVC
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier