Skip to content

Latest commit

 

History

History
21 lines (20 loc) · 394 Bytes

python_matplotlib.md

File metadata and controls

21 lines (20 loc) · 394 Bytes

Get axes

Normal way

fig, ax = plt.subplots(1, 1, figsize=(17, 10))

One by one

fig = plt.subplots(figsize=(17, 10))
# ax=fig.add_subplot(ROW,COLUMN,POSITION)
ax=f.add_subplot(1,N,i)

Plot SVGs

import matplotlib_inline.backend_inline
matplotlib_inline.backend_inline.set_matplotlib_formats('svg')

Add secondary axis

ax2 = ax1.twinx()