Skip to content

Commit c9cccf9

Browse files
Create plottingMatPlotLibImports.py
1 parent fe9d04e commit c9cccf9

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

data/plottingMatPlotLibImports.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
"""
2+
This Python script is primarily focused on
3+
importing various libraries and modules
4+
that are commonly used for data analysis and visualization.
5+
"""
6+
7+
import pandas as pd
8+
import numpy as np
9+
import math
10+
import random
11+
12+
from scipy import stats
13+
14+
15+
import matplotlib as mpl
16+
import matplotlib.pyplot as plt
17+
import matplotlib.animation as animation
18+
import matplotlib.colors as mcolors
19+
import matplotlib.dates as mdates
20+
import matplotlib.ticker as mticker
21+
22+
from matplotlib.ticker import MultipleLocator
23+
from matplotlib import font_manager
24+
from matplotlib.patches import Polygon
25+
from matplotlib.patches import Rectangle
26+
from matplotlib.patches import ConnectionPatch
27+
28+
29+
30+
"""
31+
This method converts the matplotlib figure to a vectorized image.
32+
So we can change the scale of the image without loss of quality.
33+
"""
34+
# Import matplotlib_inline
35+
from matplotlib_inline.backend_inline import set_matplotlib_formats
36+
# Set the format to SVG. The vectorized image is saved in the background.
37+
set_matplotlib_formats('svg')
38+
39+
# Alternative way:
40+
# %config InlineBackend.figure_format = 'svg'

0 commit comments

Comments
 (0)