Lab6 7
Lab6 7
'tight' option is used here to remove any extra white space around the plot.
Another charts…
• Pie Chart
• Boxplot
• Error bar
Image data to histogram
• img.ravel() is a NumPy function that returns a flattened 1-
dimensional array of the input array img.
• For example, if img is a 2D NumPy array with dimensions (height,
width), img.ravel() would return a 1D array of shape (height*width,)
that contains all the elements of the original array in a flattened
order.
• 256: This parameter specifies the number of bins in the histogram
• [0,255]: This parameter specifies the range of pixel intensities