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

DOC: Improve readability of date formatters/locators example #26254

Merged
merged 1 commit into from Jul 4, 2023

Conversation

StefRe
Copy link
Contributor

@StefRe StefRe commented Jul 4, 2023

PR summary

Improve readability of date formatters/locators example by grouping code and output.

PR checklist

Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's an improvement- minor not that you can take or leave & ping me to merge (or I'll check back in a bit)

@@ -55,13 +34,42 @@ def plot_axis(ax, locator=None, xmax='2002-02-01', fmt=None, formatter=None):
ax.text(0.0, 0.2, locator or formatter, transform=ax.transAxes,
fontsize=14, fontname='Monospace', color='tab:blue')

# %%
# :ref:`Date locators <date-tickers>` (also known as tickers)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# :ref:`Date locators <date-tickers>` (also known as tickers)
# :ref:`Date locators <date-tickers>`

Since they're locator objects, I think the also known as adds more confusion than clarity.

Copy link
Contributor Author

@StefRe StefRe Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this comment because the example calls them locators but they are called tickers in the linked docs. Not sure what's the "official" name.
grafik

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh , the class that manages location are the locators, the object they locate are the ticks, both Tick objects and Locators are found in the Tick module. Let me know if this is starting to feel out of scope/a different problem altogether

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the docs should read "Most of the date tickers locators can locate single or multiple values ticks." and "The available date tickers locators are:", right? If this is the case, should this be changed in this PR or better in a seperate one (or do I still get it wrong?).
So I will remove the "(also known as tickers)".

Copy link
Member

@story645 story645 Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, correct (I think) and your choice about this PR or follow on.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make it a separate issue

@@ -99,6 +99,8 @@

.. _dateutil: https://dateutil.readthedocs.io

.. _date-tickers:

Date tickers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also probably be changed to Date tick locators?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I just named the reference after the heading, if the heading changes it would make sense to change the reference along (although technically not necessary).

@story645 story645 added this to the v3.7-doc milestone Jul 4, 2023
@story645 story645 merged commit adb5a98 into matplotlib:main Jul 4, 2023
39 checks passed
@lumberbot-app
Copy link

lumberbot-app bot commented Jul 4, 2023

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.7.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 adb5a98ac35391dd6c3974f289344254dd9bf8b3
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #26254: DOC: Improve readability of date formatters/locators example'
  1. Push to a named branch:
git push YOURFORK v3.7.x:auto-backport-of-pr-26254-on-v3.7.x
  1. Create a PR against branch v3.7.x, I would have named this PR:

"Backport PR #26254 on branch v3.7.x (DOC: Improve readability of date formatters/locators example)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@lumberbot-app
Copy link

lumberbot-app bot commented Jul 4, 2023

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.7.1-doc
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 adb5a98ac35391dd6c3974f289344254dd9bf8b3
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #26254: DOC: Improve readability of date formatters/locators example'
  1. Push to a named branch:
git push YOURFORK v3.7.1-doc:auto-backport-of-pr-26254-on-v3.7.1-doc
  1. Create a PR against branch v3.7.1-doc, I would have named this PR:

"Backport PR #26254 on branch v3.7.1-doc (DOC: Improve readability of date formatters/locators example)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@StefRe StefRe mentioned this pull request Jul 4, 2023
1 task
@StefRe StefRe deleted the doc/date_fmt_loc branch July 4, 2023 19:27
@QuLogic QuLogic modified the milestones: v3.7-doc, v3.8.0 Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants