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

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

Merged
merged 3 commits into from Apr 18, 2013

Conversation

cimarronm
Copy link
Contributor

No description provided.

@@ -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.:
Copy link
Member

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?

@WeatherGod
Copy link
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
Copy link
Contributor Author

@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
Copy link
Contributor Author

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
Copy link
Member

pelson commented Apr 18, 2013

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 added a commit that referenced this pull request Apr 18, 2013
Normalize all 'e.g.' instances. Addresses issue #1423.
@pelson pelson merged commit 3c5bd38 into matplotlib:master Apr 18, 2013
@pelson
Copy link
Member

pelson commented Apr 18, 2013

Closes #1423 .

@astrofrog
Copy link
Contributor

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
Copy link
Member

pelson commented Apr 18, 2013

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
Copy link
Contributor

@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
Copy link
Member

pelson commented Apr 18, 2013

😄

@dmcdougall
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants