Data Science Matplotlib Library Data Visualization, ASSIGNMENT - 6, GO_STP_8113
SOLUTIONS : Load the necessary package for plotting using pyplot from matplotlib. Example - Days(x-axis) represents 8 days and Speed represents a car’s speed. Plot a Basic line plot between days and car speed, put x axis label as days and y axis label as car speed and put title Car Speed Measurement. Days=[1,2,3,4,5,6,7,8] Speed=[60,62,61,58,56,57,46,63] import matplotlib.pyplot as plt Days=[ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ] Speed=[ 60 , 62 , 61 , 58 , 56 , 57 , 46 , 63 ] plt.plot(Days,Speed) plt.xlabel( 'days' ) plt.ylabel( 'car speed' ) plt.title( 'Car Speed Measurement' ) plt.show() OUTPUT : 2. Now to above car data apply some string formats like line style example green dotted line, marker shape like +, change markersize, markerface color etc. #line style green dotted line Days=[ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ] Speed=[ 60 , 62 , 61 , 5...

Comments
Post a Comment