8000 Fixed typo by szemek · Pull Request #5357 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fixed typo #5357

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 30, 2015
Merged

Fixed typo #5357

merged 1 commit into from
Oct 30, 2015

Conversation

szemek
Copy link
@szemek szemek commented Oct 30, 2015

Tiny fix: antialised => antialiased

matplotlib/matplotlib.github.com#13

@szemek
Copy link
Author
szemek commented Oct 30, 2015

To provide more info for reviewer. When I tried following code:

import matplotlib
import matplotlib.pyplot

matplotlib.pyplot.plot([1,2,3], [1,2,3], 'go-', antialised=False)

I got

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-6412c83c6710> in <module>()
      4 import matplotlib.pyplot
      5 
----> 6 matplotlib.pyplot.plot([1,2,3], [1,2,3], 'go-', antialised=False)

/opt/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.pyc in plot(*args, **kwargs)
   3097         ax.hold(hold)
   3098     try:
-> 3099         ret = ax.plot(*args, **kwargs)
   3100         draw_if_interactive()
   3101     finally:

/opt/anaconda/lib/python2.7/site-packages/matplotlib/axes/_axes.pyc in plot(self, *args, **kwargs)
   1371         lines = []
   1372 
-> 1373         for line in self._get_lines(*args, **kwargs):
   1374             self.add_line(line)
   1375             lines.append(line)

/opt/anaconda/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in _grab_next_args(self, *args, **kwargs)
    302                 return
    303             if len(remaining) <= 3:
--> 304                 for seg in self._plot_args(remaining, kwargs):
    305                     yield seg
    306                 return

/opt/anaconda/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in _plot_args(self, tup, kwargs)
    290         ncx, ncy = x.shape[1], y.shape[1]
    291         for j in xrange(max(ncx, ncy)):
--> 292             seg = func(x[:, j % ncx], y[:, j % ncy], kw, kwargs)
    293             ret.append(seg)
    294         return ret

/opt/anaconda/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in _makeline(self, x, y, kw, kwargs)
    242                             **kw
    243                             )
--> 244         self.set_lineprops(seg, **kwargs)
    245         return seg
    246 

/opt/anaconda/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in set_lineprops(self, line, **kwargs)
    182             funcName = "set_%s" % key
    183             if not hasattr(line, funcName):
--> 184                 raise TypeError('There is no line property "%s"' % key)
    185             func = getattr(line, funcName)
    186             func(val)

TypeError: There is no line property "antialised"

Changing it to:

import matplotlib
import matplotlib.pyplot

matplotlib.pyplot.plot([1,2,3], [1,2,3], 'go-', antialiased=False)

solved a problem.

@WeatherGod
Copy link
Member

Well, it is a good thing nobody would ever have code that directly depended upon the documentation (cough) https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/artist.py#L1043 (cough). That would have been disastrous!

WeatherGod added a commit that referenced this pull request Oct 30, 2015
@WeatherGod WeatherGod merged commit f35e55a into matplotlib:master Oct 30, 2015
@WeatherGod
Copy link
Member

@tacaswell, do we continue to backport stuff to 1.5.x?

@szemek szemek deleted the typo-fix branch October 30, 2015 14:52
@jenshnielsen
Copy link
Member

According to the discussion in the new gitter channel we should backport that

@mdboom
Copy link
Member
mdboom commented Oct 30, 2015

I think for clear simple bugfixes like this, yes. Milestone as 1.5.1. Then periodically that will flow up to 2.0.x.

@mdboom mdboom added this to the Next bugfix release (1.5.1) milestone Oct 30, 2015
@mdboom
Copy link
Member
mdboom commented Oct 30, 2015

Backported to v1.5.x as bd5f846

WeatherGod added a commit that referenced this pull request Oct 30, 2015
WeatherGod added a commit that referenced this pull request Oct 30, 2015
@mdboom
Copy link
Member
mdboom commented Oct 30, 2015

Backported to v1.5.0-doc as 09ee788

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.

5 participants
0