#!/usr/bin/env python # coding: utf-8 # # Practice Problems # ### Lecture 26 # Answer each number in a separate cell # # Rename the notebook with your lastName, first initial and the lecture # # ex. Cych_B_26 # # Turn this notebook into Canvas. # ## 1. Mplot3d # - Import **random** from numpy and use it to generate 3 arrays- each with 10 random values. # - Plot the points using the **Axes3D** **.add_subplot** to make a 3D figure object. Then use the method **ax.scatter( )** to plot the data as blue dots. # - Label your axes. # # ## 2. Mplot3d and subduction zones # - Modify the 3D figure of the earthquakes around the Marianas Trench. # - Read in the data in Datasets/EarthquakeLocations/last5Years.csv as a DataFrame and filter with the box as in the lecture. # - Look at the columns in the filtered DataFrame **box** # - What is the magnitude of the largest earthquake? the smallest earthquake? # - Change the color to blue and set the opacity using the **alpha** keyword. # - Make an array of sizes from the 'mag' column and raise 32 to the magnetudes (to be proportional to the energy released. # - Normalize the array by the mean value, then multiply by 10. # - Set the symbol size in the 3D figure, to be proportional to your sizes array. # - **Hint:** use the keyword argument **s** to set the markersize # In[ ]: