Articles → Matplotlib → drawstyle attribute in plot function in matplotlib

drawstyle attribute in plot function in matplotlib






Purpose





Syntax


drawStyle =”” #'default', 'steps-mid', 'steps-pre', 'steps-post', 'steps'



Example


import matplotlib.pyplot as plt
import array 


arr1 = array.array('i', [1, 2, 3])
arr2 = array.array('i', [4, 5, 6])

plt.plot(arr1,arr2, drawStyle="steps-mid" )

plt.show()



Output


Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Friday, June 14, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250