219k views
2 votes
Draw a line plot with years on the horizontal axis and murder rates on the vertical axis. Include two lines: one for Alaska murder rates and one for Minnesota murder rates. Create this plot using a single call, ak_mn.plot('Year').

Hint: To create two lines, you will need to create the table ak_mn with two columns of murder rates, in addition to a column of years. This table will have the following structure:
Year Murder rate in Alaska Murder rate in Minnesota
1960 10.2 1.2
1961 11.5 1
1962 4.5 0.9

User Sisi
by
8.5k points

1 Answer

6 votes

Final answer:

To create a line plot for Alaska and Minnesota murder rates by year, structure a table with columns for 'Year', 'Murder rate in Alaska', and 'Murder rate in Minnesota'. Plot these points using a graphical tool and connect them to display the trends over time.

Step-by-step explanation:

To draw a line plot with years on the horizontal axis and murder rates on the vertical axis for both Alaska and Minnesota, you will first need a table (ak_mn) structured with three columns: 'Year', 'Murder rate in Alaska', and 'Murder rate in Minnesota'. Using a plotting library, such as matplotlib in Python, you would then use the plot command with 'Year' as your x-axis to create the plot. This table might look like this:

  • 1960 | 10.2 | 1.2
  • 1961 | 11.5 | 1.0
  • 1962 | 4.5 | 0.9

After constructing your table, the ak_mn.plot('Year') call will generate a line plot with two different lines, each representing the murder rates for Alaska and Minnesota respectively. Each point on the line corresponds to the murder rate for that year and that state. By plotting consecutive points and connecting them with a line, readers will be able to see the trend of murder rates over time for both states.

User Fransiskus
by
8.0k points