Skip to content

🤖python-datavis: Inconsistent Usage of Plotting APIs #13

Open
@clstaudt

Description

@clstaudt

Labels: code, consistency, documentation
Priority: Medium

Description:
The notebook uses both pandas plotting and matplotlib for visualization without clearly explaining when and why to use one over the other. This might confuse beginners about best practices regarding plotting libraries.

Suggestion:
Standardize the use of plotting libraries throughout the notebook or provide clear guidance on when to use pandas plotting versus matplotlib directly. Explain the advantages or use cases of each method to provide clarity to the reader.

Example Implementation:

Plotting with Pandas vs Matplotlib

In this notebook, we utilize both the pandas built-in plotting capabilities and the matplotlib library for creating visualizations. While pandas plotting provides a convenient interface to quickly generate standard plots from DataFrames, matplotlib offers more flexibility and customization options.

Use pandas plotting when:

  • You want quick and easy visualization of DataFrame or Series data.
  • You are creating standard plots such as bar charts, line charts, or histograms.

Use matplotlib when:

  • You need fine-grained control over the elements of the plot.
  • You are creating complex or custom visualizations that are not directly supported by the pandas library.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions