Normalize all 'e.g.' instances. Addresses issue #1423. #1916

Merged
merged 3 commits into from Apr 18, 2013

Projects

None yet

5 participants

@cimarronm

No description provided.

@WeatherGod WeatherGod commented on an outdated diff Apr 17, 2013
doc/users/artists.rst
@@ -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.:
@WeatherGod
WeatherGod Apr 17, 2013

Whoa, that's a long line I haven't noticed before. Can we get this one broken up, please?

@WeatherGod
Matplotlib Developers member

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 !

@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.

@cimarronm

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.

@pelson
Matplotlib Developers member

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!

@pelson pelson merged commit 3c5bd38 into matplotlib:master Apr 18, 2013

1 check passed

Details default The Travis build passed
@pelson
Matplotlib Developers member

Closes #1423 .

@astrofrog

There seem to be a few cases where a comma was added but is not necessary, e.g. search, e.g., "codex ellipse" which I think should be search, e.g. "codex ellipse". Also, I think that sentences shouldn't start with e.g. but For example. Is there an emojii for pedanticism? ;)

@pelson
Matplotlib Developers member

There seem to be a few cases where a comma was added but is not necessary

I was surprised by this too, but apparently it is the "American English" way... http://en.wiktionary.org/wiki/e.g.

@astrofrog

@pelson - oh I see. I'm half british so that's probably why it looks wrong ;) The Monty Python would not be happy :-p

@pelson
Matplotlib Developers member

😄

@dmcdougall
Matplotlib Developers member

I type 'colour' and 'realise' without thinking about it. It's habit. Doesn't mean my coworkers don't slap my wrists :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment