Skip to content

DOC: Move OO-examples from pyplot section #24054

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

Merged
merged 1 commit into from
Oct 2, 2022

Conversation

StefRe
Copy link
Contributor

@StefRe StefRe commented Sep 29, 2022

PR Summary

This PR has two commits:
1) Move OO-examples from pyplot section to corresponding sections for OO-style examples and

  • remove pyplot/bpyplots/boxplot_demo_pyplot.py as it's the same as the
    boxplot demo in statistics
  • remove pyplots/text_layout.py as it's a duplicate of text_alignment.py
    in Text, labels and annotations.
  • merge very basic examples pyplots/fig_axes_labels_simple.py and
    pyplots/pyplot_formatstr.py into pyplots/pyplot_simple.py
Example Decision
Align y-labels move to Text, labels and annotations
Annotate Transform move to Text, labels and annotations
Annotating a plot move to Text, labels and annotations
Annotation Polar move to Text, labels and annotations
Programmatically controlling subplot adjustment move to Subplots, axes and figures
Infinite lines keep
Boxplot Demo remove (same as Boxplots in Statistics)
Dollar Ticks move to Ticks (the artists tutorial refers to it, so keep it)
Fig Axes Customize Simple move to Ticks
Simple axes labels remove (already covered in "Pyplot Simple" and the second example in Using accented text in Matplotlib example)
Adding lines to figures move to Miscellaneous
plot() format string remove and merge into "Pyplot Simple"
Pyplot Mathtext keep
Pyplot Simple keep and combine with "plot() format string"
Pyplot Text keep
Pyplot Three keep
Pyplot Two Subplots keep
Text Commands move to Text, labels and annotations (although there already lots of similar examples there)
Text Layout remove (duplicate of Text alignment in Text, labels and annotations)

Closes #15922.

2) Revert doc build in parallel

This is necessary to build to docs with the redirects.

Closes #24058

PR Checklist

Tests and Styling

  • [N/A] Has pytest style unit tests (and pytest passes).
  • [N/A] Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@StefRe StefRe force-pushed the DOC/pyplot_examples branch 2 times, most recently from dcbb956 to 8f7d4e4 Compare September 30, 2022 08:45
@StefRe StefRe marked this pull request as ready for review September 30, 2022 10:32
@StefRe
Copy link
Contributor Author

StefRe commented Sep 30, 2022

Errors in Greetings and test_hexbin_log_empty[png] appear to be unrelated to this PR.

@oscargus
Copy link
Member

Although I think this makes sense, I am not so sure about removing the parallel build.

It is almost so that one should not make the dollar_ticks change just to still enable parallel build... (But I guess other people may have other opinions so better wait a bit...)

to corresponding sections for OO-style examples.

- remove pyplot/bpyplots/boxplot_demo_pyplot.py as it's the same as the
  boxplot demo in statistics
- remove pyplots/text_layout.py as it's a duplicate of text_alignment.py
  in Text, labels and annotations.
- merge very basic examples pyplots/fig_axes_labels_simple.py and
  pyplots/pyplot_formatstr.py into pyplots/pyplot_simple.py
@StefRe StefRe force-pushed the DOC/pyplot_examples branch from 668f190 to be38b21 Compare September 30, 2022 15:21
@StefRe
Copy link
Contributor Author

StefRe commented Sep 30, 2022

Please accept my apology @oscargus. I included the same redirect in two different files. This error didn't show up for non-parallel builds: the second redirect just overwrites the first one. I fixed this mistake and the docs build in parallel without errors.

@timhoffm timhoffm added this to the v3.6.1 milestone Oct 2, 2022
@timhoffm timhoffm merged commit 1b3019d into matplotlib:main Oct 2, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 2, 2022
@StefRe StefRe deleted the DOC/pyplot_examples branch October 2, 2022 16:42
timhoffm added a commit that referenced this pull request Oct 2, 2022
…054-on-v3.6.x

Backport PR #24054 on branch v3.6.x ( DOC: Move OO-examples from pyplot section)
timhoffm added a commit to timhoffm/matplotlib that referenced this pull request Dec 20, 2022
The example /gallery/pyplots/dollar_ticks is included into
the artists tutorial. matplotlib#24054 Moved that example and added
a `.. redirect-from::` directive. This was then duplicated
by the include.

This PR fixes the issue by moving the include start point
after the redirect.
@ksunden ksunden mentioned this pull request Feb 20, 2023
6 tasks
raphaelquast pushed a commit to raphaelquast/matplotlib that referenced this pull request Mar 16, 2023
The example /gallery/pyplots/dollar_ticks is included into
the artists tutorial. matplotlib#24054 Moved that example and added
a `.. redirect-from::` directive. This was then duplicated
by the include.

This PR fixes the issue by moving the include start point
after the redirect.
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

Successfully merging this pull request may close these issues.

[BUG] redirect-from sphinx extension is not parallel safe Pyplot gallery section is mostly OO examples
3 participants