-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Normalize all 'e.g.' instances. Addresses issue #1423. #1916
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
Conversation
@@ -517,7 +517,7 @@ and zooming, as well as the :class:`~matplotlib.ticker.Locator` and | |||
:class:`~matplotlib.ticker.Formatter` instances which control where | |||
the ticks are placed and how they are represented as strings. | |||
|
|||
Each ``Axis`` object contains a :attr:`~matplotlib.axis.Axis.label` attribute (this is what :mod:`~matplotlib.pylab` modifies in calls to :func:`~matplotlib.pylab.xlabel` and :func:`~matplotlib.pylab.ylabel`) as well as a list of major and minor ticks. The ticks are :class:`~matplotlib.axis.XTick` and :class:`~matplotlib.axis.YTick` instances, which contain the actual line and text primitives that render the ticks and ticklabels. Because the ticks are dynamically created as needed (eg. when panning and zooming), you should access the lists of major and minor ticks through their accessor methods :meth:`~matplotlib.axis.Axis.get_major_ticks` and :meth:`~matplotlib.axis.Axis.get_minor_ticks`. Although the ticks contain all the primitives and will be covered below, the ``Axis`` methods contain accessor methods to return the tick lines, tick labels, tick locations etc.: | |||
Each ``Axis`` object contains a :attr:`~matplotlib.axis.Axis.label` attribute (this is what :mod:`~matplotlib.pylab` modifies in calls to :func:`~matplotlib.pylab.xlabel` and :func:`~matplotlib.pylab.ylabel`) as well as a list of major and minor ticks. The ticks are :class:`~matplotlib.axis.XTick` and :class:`~matplotlib.axis.YTick` instances, which contain the actual line and text primitives that render the ticks and ticklabels. Because the ticks are dynamically created as needed (e.g., when panning and zooming), you should access the lists of major and minor ticks through their accessor methods :meth:`~matplotlib.axis.Axis.get_major_ticks` and :meth:`~matplotlib.axis.Axis.get_minor_ticks`. Although the ticks contain all the primitives and will be covered below, the ``Axis`` methods contain accessor methods to return the tick lines, tick labels, tick locations etc.: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa, that's a long line I haven't noticed before. Can we get this one broken up, please?
I have looked through the changes and say that all the changes made were correct (in other words, there are no instances of something being incorrectly identified as something to be converted into 'e.g.,'). As for false negatives, that is a different story. I take it you grepped for the different variations to make this patch? My only (very minor) concern is if any of these changes pushed the line width past the PEP8 limits. Great work, @cimarronm ! |
@WeatherGod You are correct. I cannot really say all instances (undoubtedly I probably missed some) but I grepped for quite a few variations of how e.g. was done and then manually corrected them which is why there shouldn't be any false positives; my main emphasis was on not mistakenly making something e.g. which shouldn't have been. |
I wrote a quick awk script to look for anything with line width greater than 79 on the lines I touched and found two (one already over 79 and the other which just got pushed over). Glad you mentioned it. I reformatted those two lines to be compliant. |
I'm going to go ahead and merge this PR. Because it touches so many files, I did not want this to go stale. If there are any further actions on these changes, please continue to comment (I've had a look through and haven't found any) and I'm sure @cimarronm would be happy to open a follow-up PR. Good work @cimarronm! |
Normalize all 'e.g.' instances. Addresses issue #1423.
Closes #1423 . |
There seem to be a few cases where a comma was added but is not necessary, e.g. |
I was surprised by this too, but apparently it is the "American English" way... http://en.wiktionary.org/wiki/e.g. |
@pelson - oh I see. I'm half british so that's probably why it looks wrong ;) The Monty Python would not be happy :-p |
😄 |
I type 'colour' and 'realise' without thinking about it. It's habit. Doesn't mean my coworkers don't slap my wrists :) |
No description provided.