matplotlib / matplotlib/mplfinance

how to add legend to the plot?

Open
#181 28 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
4.4k
Forks
678
PR merge metrics
No merged PRs in 30d

Description

How to add a legend to the plots? For example, if using several moving averages it will be useful to show a legend to map moving averages to line plots.

Is clear how this is done using matplotlib but I did not see an example of how to do so using the mplfinance package.

TIA,

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names mplfinance plots and matplotlib but no source files, tests, or entry points. Start by reviewing the plotting API and the existing moving-average examples, then clarify the intended legend interface and expected behavior. Done should include supported legend behavior with an example or test, once the scope is agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.