Question: Question 3 - Matplotlib ( 2 4 Pts ) Implement the following tasks by using Matplotlib library. [ Task - 3 . 1 ] (

Question 3- Matplotlib (24 Pts)
Implement the following tasks by using Matplotlib library.
[Task-3.1](12 Pts) Plot sine, cosine, tangent, and cotangent functions as 2-by-2 subplots inside one figure. For all functions, set the range of x-axis between 0 and 360. For the sine and cosine, set the range of y-axis between -1 and 1. For the tangent and cotangent, adjust the range of y-axis to avoid extreme values. Split the grids into 8 equal portions in x and y axis. Set different colors for each function graph. Draw tangent and cotangent graphs with dashed lines. Add a legend to the upper right corner of each subplot. Add title to each subplot.
[Task-3.2](12 Pts) Load the csv file "california_cities.csv" into a DataFrame. Extract data of "latd", "longd", "area_total_km2", and "area_water_percent". You are expected to draw a scatter plot. Set x-axis as latitude and set y-axis as longitude. Set the size of the points to represent the total area of cities. Add a legend to the upper right corner of the figure and show sizes of points for 10,25,50,100, and 250km2. Set the colors of the points to represent the percentage of water in the area. Add a color bar next to the figure. Set the label and title names.
3
Figure 2: Expected result of Task-3.2
 Question 3- Matplotlib (24 Pts) Implement the following tasks by using

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!