Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤖python-datavis: Misleading Comment on Matplotlib-style Parameters #15

Open
clstaudt opened this issue Mar 11, 2024 · 0 comments
Open
Assignees

Comments

@clstaudt
Copy link
Collaborator

clstaudt commented Mar 11, 2024

Labels: clarification, matplotlib, documentation
Priority: Low

Description:
The notebook ends with a comment on Matplotlib-style parameters that might imply the configurations are specific to Matplotlib, while they also affect Seaborn and Pandas plots that are based on Matplotlib.

Suggestion:
Clarify that the Matplotlib-style parameters set at the beginning of the notebook also influence the appearance of plots generated by Seaborn and Pandas, as both libraries build on Matplotlib. Provide a short explanation on how these settings are used by the underlying Matplotlib engine to maintain a consistent style across different libraries.

Example Implementation:

Matplotlib Style Configuration Impact

The style parameters configured at the beginning of this notebook not only affect matplotlib plots but also extend to seaborn and pandas plots that are built on top of matplotlib. This ensures consistency in the visual style of plots across different libraries.

Here is an overview of the parameters set and their impact on the visual style:

# Style configuration that affects all plots
seaborn.set_style("ticks")
plt.rcParams["figure.figsize"] = (16.0, 6.0)
plt.rcParams["axes.grid"] = True

This code sets the default style for seaborn plots to 'ticks', specifies a default figure size, and enables grid lines on plots. These settings will be applied to all plots in the notebook, regardless of which library is used to generate them.

@clstaudt clstaudt self-assigned this Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant