Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Adjusting Subplot Margins in Matplotlib

import matplotlib.pyplot as plt
 
# Left Plot
plt.subplot(1, 2, 1)
plt.plot([-2, -1, 0, 1, 2], [4, 1, 0, 1, 4])
 
# Right Plot
plt.subplot(1, 2, 2)
plt.plot([-2, -1, 0, 1, 2], [4, 1, 0, 1, 4])
 
# Subplot Adjust
plt.subplots_adjust(wspace=1.3)
 
plt.show()
Source by www.codecademy.com #
 
PREVIOUS NEXT
Tagged: #Adjusting #Subplot #Margins #Matplotlib
ADD COMMENT
Topic
Name
2+2 =