HOME/Articles/

matplotlib example vector-graphic-plots-preamble (snippet)

Article Outline

Python matplotlib example 'vector-graphic-plots-preamble'

Modules used in program:

  • import seaborn
  • import pandas
  • import numpy
  • import matplotlib.pyplot # as plt

python vector-graphic-plots-preamble

Python matplotlib example: vector-graphic-plots-preamble

# Make plots inline
%matplotlib inline

# Make inline plots vector graphics instead of raster graphics
from IPython.display import set_matplotlib_formats
set_matplotlib_formats('pdf', 'svg')

# import modules for plotting and data analysis
import matplotlib.pyplot # as plt
import numpy
import pandas
import seaborn