Skip to content

Plotting Too Much Data

Daniel Goldfarb edited this page Mar 5, 2021 · 41 revisions

Plotting Too Much Data

  • Sometimes, without realizing it, users plot so much data that it becomes impossible to see the detailed shapes of candles or ohlc-bars.
    • In such a case, it is easy to think that you have a line plot instead of candles, as shown below:


How many candles are too many to see?

  • How many is "Too Many" depends primarily on the size of your plot, and on the resolution of your monitor (or printer).
  • The Above image shows 500 candles.
  • Below is the exact same 500 candle plot made full screen on a 27 inch monitor with basic HD (1920 x 1080) resolution.
  • Notice that now, at full screen, you can somewhat make out the appearance of candles:


Is there something wrong with Mplfinance? Why does it work this way?

  • No, this has nothing to do with mplfinance.
    • This is largely due to the current state of computer graphics technology, and partially due to the limitations of human eyesight.

What Can You Do About Plotting So Much Data?

  • There are a number of things that can be done, including:
    • interactive zoom
    • use type=line
    • resample data
    • plot less data
  • The Images Below show 2000 rows of ohlc data, first as type='candle' and then as `type='line'.
  • Ask yourself, if you want to take a "big picture view" of your data (in this case over 7 years worth), ask yourself if seeing the individual one day at a time candle patterns will really make a difference to you. The question applies to viewing say 1 week of 1 minute candles (also approximately 2000 data points). Perhaps if looking at 7 years of trading, then weekly (instead of daily) candles are more appropriate. Or for 5 days of intraday trading, perhaps 5 minute (instead of 1 minute) intervals are just as useful for that long of a stretch of time.

If not, then perhaps use a line chart. If yes, then consider resampling your data, so that each candle represents, not one day, but one week, or one month, etc.

Clone this wiki locally