[go: up one dir, main page]

0% found this document useful (0 votes)
11 views1 page

Matplotlib Assessment

The document outlines a series of tasks for creating various types of plots using Matplotlib, including line graphs, bar charts, pie charts, scatter plots, and histograms. It also includes instructions for customizing plots with titles, labels, legends, and annotations, as well as saving plots and adjusting figure sizes. The tasks emphasize the use of different styles, colors, and layouts in visualizing data effectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Matplotlib Assessment

The document outlines a series of tasks for creating various types of plots using Matplotlib, including line graphs, bar charts, pie charts, scatter plots, and histograms. It also includes instructions for customizing plots with titles, labels, legends, and annotations, as well as saving plots and adjusting figure sizes. The tasks emphasize the use of different styles, colors, and layouts in visualizing data effectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Matplotlib Assessment

1. Plot a simple line graph using the values: x = [1, 2, 3, 4], y = [10, 20, 25, 30]

2. Add a title and axis labels to the line graph in Question 1.

3. Plot a red dotted line for: x = [0, 1, 2, 3], y = [3, 6, 1, 8]

4. Plot two lines in the same graph: x = [1, 2, 3, 4], y1 = [10, 20, 25, 30], y2 = [5, 15, 20, 25]

5. Add a legend to the above plot to differentiate the two lines.

6. Plot a bar chart for: Fruits = ['Apple', 'Banana', 'Mango'], Quantity = [10, 20, 15]

7. Plot a horizontal bar chart for the same fruit and quantity data.

8. Create a pie chart with percentage labels: Subjects = ['Math', 'Science', 'English'], Values =
[30, 40, 30]

9. Create a scatter plot: x = [5, 7, 8, 7], y = [8, 5, 6, 3]

10. Create a histogram for the data: marks = [60, 70, 80, 75, 70, 90, 85, 80]

11. Create a subplot with two plots: one line plot and one bar chart.

12. Change the figure size to 8x5 while plotting a simple graph.

13. Plot a graph with customized line style, marker, and color.

14. Save a plot as a PNG file using plt.savefig()

15. Add grid lines to any plot you create.

16. Plot a line graph and annotate the highest point on it.

17. Create a bar chart and add value labels on top of each bar.

18. Create a plot with x-axis rotated 45 degrees using tick labels: Months = ['Jan', 'Feb',
'Mar', 'Apr'], Sales = [250, 300, 150, 400]

19. Draw three subplots in a single row, each with a different plot (line, bar, pie).

20. Use different colors for each bar in a bar chart using the color parameter.

You might also like