matplotlib / matplotlib/cheatsheets

Clarify when to use None / np.nan to segement data

Open
#113 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.7k
Forks
916
PR merge metrics
No merged PRs in 30d

Description

see https://github.com/matplotlib/matplotlib/issues/23714

These is some user confusion about when to use `ax.plot` with `np.nan` separated data and when something like `LineCollection` is a better choice. In particular, using the segmented data approach the line will be drawn as a single path which will not show self-intersection for alpha < 1.

Contributor guide

No contributing guide indexed for this repository

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

Start with the linked Matplotlib issue and compare the documented uses of ax.plot with np.nan-separated data and LineCollection. Clarify when each approach is appropriate, including the limitation that a single path does not show self-intersection for alpha < 1; done when the cheatsheet guidance resolves this confusion.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.