Enhance data visualization by integrating scatter plots to highlight critical data points clearly and effectively. Learn how to customize markers, colors, and sizes to make financial data insights more visible.
Key Insights
- Utilize scatter plots within pyplot to visually represent critical data points such as highest and lowest Apple stock prices.
- Customize visual attributes by using distinct features like green star markers for highs and red star markers for lows, enhancing clarity and readability.
- Access and visualize accurate financial data clearly and quickly through APIs, improving the overall effectiveness of data-driven visualizations.
Note: These materials offer prospective students a preview of how our classes are structured. Students enrolled in this course will receive access to the full set of materials, including video lectures, project-based assignments, and instructor feedback.
Let's add scatter plots for the high and the low. All right, we'll say pyplot.scatter
. There it is. We give an X and a Y point—where X is the date and Y is the price.
highest_apple_price
. And then we can add some things to make it look better. Make the marker a little star.
Set the color to green—since it's the high, green feels appropriate. And make the size large so this is very visible. And there we go.
Big green star up there. Let's do the same thing. I’ll copy and paste this for the low.
low_date
, lowest_apple_price
. Let's change the color to red. And there it is.
There’s our low, right there. Okay, so what's the takeaway here? We've explored a great way to use APIs to get our data. Let's sum that up in a little more detail in the next video.