Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

Matplotlib Tutorial 24 - multi y axis plotting volume on stock chart

45.6K views
•
July 11, 2015
by
sentdex
YouTube video player
Matplotlib Tutorial 24 - multi y axis plotting volume on stock chart

TL;DR

This tutorial demonstrates how to create a subplot with multiple y-axes in Matplotlib, specifically focusing on plotting price and volume data.

Transcript

what is going on everybody welcome to part 24 over matplotlib tutorial series in this part what we're gonna be talking about is a multiple y-axes so up into this point each little you know subplot is its own subplots own special butterfly where what we might want to do from time to time though is have a subplot that has two types of data on it but ... Read More

Key Insights

  • 😀 Subplots with multiple y-axes are useful when plotting data with different scales, such as price and volume.
  • ☺️ The twinx() function in Matplotlib allows for the creation of additional axes that share the same x-axis.
  • 😫 The fill_between() function can be used to visually represent the space between two sets of data.
  • 👻 Adjusting the alpha value of the fill color allows for better visibility of the underlying data.
  • 🫥 Removing tick labels and grid lines can help simplify the visualization.
  • 💹 Scaling the y-axis of certain data, such as volume, can prevent it from dominating the chart.
  • 💁 Legends can be added to provide additional information about the plotted data.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: Why would we want to create a subplot with multiple y-axes in Matplotlib?

Creating a subplot with multiple y-axes allows us to display and compare data that may have different scales, such as price and volume in financial charts.

Q: How do we define an additional axes for the volume data?

We can use the twinx() function to create another axes that shares the same x-axis with the main subplot.

Q: What is the purpose of the fill_between() function in this tutorial?

The fill_between() function is used to fill the space between the price and volume data, visually highlighting the fluctuations and spikes in volume.

Q: Why is the alpha parameter used when filling between the price and volume data?

Adding an alpha value to the fill color allows us to make it partially transparent, ensuring that the price data remains visible even when the volume data overlaps with it.

Summary & Key Takeaways

  • This tutorial discusses the concept of having subplots with different scales of data, using the example of plotting price and volume data together.

  • It explains how to define an additional axes for the volume data using the twinx() function.

  • The tutorial demonstrates how to fill the space between the price and volume data using the fill_between() function, and how to customize the appearance by adjusting the alpha and face color.

  • It also covers removing tick labels and grid lines, and scaling the y-axis of the volume data to prevent it from occupying too much space.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from sentdex 📚

Python Generator Functions for massive Performance Improvements with Lists thumbnail
Python Generator Functions for massive Performance Improvements with Lists
sentdex
Parsing XML - Go Lang Practical Programming Tutorial p.11 thumbnail
Parsing XML - Go Lang Practical Programming Tutorial p.11
sentdex
Python: How to Program the Chaikin Money Flow Trading Indicator thumbnail
Python: How to Program the Chaikin Money Flow Trading Indicator
sentdex
How to Train a Chatbot Using TensorFlow and Python thumbnail
How to Train a Chatbot Using TensorFlow and Python
sentdex
Python: How to Graph the Chaikin Money Flow Trading Indicator in Matplotlib thumbnail
Python: How to Graph the Chaikin Money Flow Trading Indicator in Matplotlib
sentdex
How to Parse Twitter for Twitter Analysis: Part 1 thumbnail
How to Parse Twitter for Twitter Analysis: Part 1
sentdex

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.