8000 Merge remote-tracking branch 'matplotlib/v1.5.x' into v2.x · matplotlib/matplotlib@8e57552 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8e57552

Browse files
committed
Merge remote-tracking branch 'matplotlib/v1.5.x' into v2.x
2 parents 95cbca4 + 2fa27af commit 8e57552

File tree

7 files changed

+22
-17
lines changed
  • faq
  • users
  • 7 files changed

    +22
    -17
    lines changed

    INSTALL

    Lines changed: 5 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -234,8 +234,11 @@ matplotlib with a user interface toolkit. See
    234234
    :ref:`what-is-a-backend` for more details on the optional matplotlib
    235235
    backends and the capabilities they provide.
    236236

    237-
    :term:`tk` 8.3 or later
    238-
    The TCL/Tk widgets library used by the TkAgg backend
    237+
    :term:`tk` 8.3 or later, not 8.6.0 or 8.6.1
    238+
    The TCL/Tk widgets library used by the TkAgg backend.
    239+
    240+
    Versions 8.6.0 and 8.6.1 are known to have issues that may result
    241+
    in segfaults when closing multiple windows in the wrong order.
    239242

    240243
    :term:`pyqt` 4.0 or later
    241244
    The Qt4 widgets library python wrappers for the Qt4Agg backend

    doc/_static/boxplot_explanation.png

    15.4 KB
    Loading

    doc/_static/numfocus_badge.png

    13.3 KB
    Loading

    doc/_templates/index.html

    Lines changed: 2 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -178,7 +178,8 @@ <h1>Citing matplotlib</h1>
    178178
    </p>
    179179

    180180
    <h1>Open source</h1>
    181-
    181+
    <img src="_static/numfocus_badge.png" alt="A Fiscally Sponsored Project of NUMFocus"
    182+
    style="float:right; margin-left:20px" />
    182183
    <p>
    183184
    Please
    184185
    consider <a href="https://www.flipcause.com/widget/MjI1OA==">donating

    doc/faq/virtualenv_faq.rst

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -100,7 +100,7 @@ implemented in a script as below. To use this modify ``PYVER`` and
    100100
    PYTHON=${PATHTOPYTHON}python${PYVER}
    101101
    102102
    # find the root of the virtualenv, it should be the parent of the dir this script is in
    103-
    ENV=`$PYTHON -c "import os; print os.path.abspath(os.path.join(os.path.dirname(\"$0\"), '..'))"`
    103+
    ENV=`$PYTHON -c "import os; print(os.path.abspath(os.path.join(os.path.dirname(\"$0\"), '..')))"`
    104104
    105105
    # now run Python with the virtualenv set as Python's HOME
    106106
    export PYTHONHOME=$ENV

    doc/users/colormaps.rst

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -166,7 +166,7 @@ printed in grayscale.
    166166
    Color vision deficiencies
    167167
    =========================
    168168

    169-
    There is a lot of information available about color blindness available (*e.g.*,
    169+
    There is a lot of information available about color blindness (*e.g.*,
    170170
    [colorblindness]_). Additionally, there are tools available to convert images to
    171171
    how they look for different types of color vision deficiencies (*e.g.*, [asp]_).
    172172

    doc/users/event_handling.rst

    Lines changed: 13 additions & 12 deletions
    Original file line numberDiff line numberDiff line change
    @@ -34,8 +34,8 @@ was pressed::
    3434
    ax.plot(np.random.rand(10))
    3535

    3636
    def onclick(event):
    37-
    print 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f'%(
    38-
    event.button, event.x, event.y, event.xdata, event.ydata)
    37+
    print('button=%d, x=%d, y=%d, xdata=%f, ydata=%f' %
    38+
    (event.button, event.x, event.y, event.xdata, event.ydata))
    3939

    4040
    cid = fig.canvas.mpl_connect('button_press_event', onclick)
    4141

    @@ -128,7 +128,7 @@ is created every time a mouse is pressed::
    128128
    self.cid = line.figure.canvas.mpl_connect('button_press_event', self)
    129129

    130130
    def __call__(self, event):
    131-
    print 'click', event
    131+
    print('click', event)
    132132
    if event.inaxes!=self.line.axes: return
    133133
    self.xs.append(event.xdata)
    134134
    self.ys.append(event.ydata)
    @@ -196,7 +196,7 @@ Here is the solution::
    196196

    197197
    contains, attrd = self.rect.contains(event)
    198198
    if not contains: return
    199-
    print 'event contains', self.rect.xy
    199+
    print('event contains', self.rect.xy)
    200200
    x0, y0 = self.rect.xy
    201201
    self.press = x0, y0, event.xdata, event.ydata
    202202

    @@ -207,7 +207,8 @@ Here is the solution::
    207207
    x0, y0, xpress, ypress = self.press
    208208
    dx = event.xdata - xpress
    209209
    dy = event.ydata - ypress
    210-
    #print 'x0=%f, xpress=%f, event.xdata=%f, dx=%f, x0+dx=%f'%(x0, xpress, event.xdata, dx, x0+dx)
    210+
    #print('x0=%f, xpress=%f, event.xdata=%f, dx=%f, x0+dx=%f' %
    211+
    # (x0, xpress, event.xdata, dx, x0+dx))
    211212
    self.rect.set_x(x0+dx)
    212213
    self.rect.set_y(y0+dy)
    213214

    @@ -271,7 +272,7 @@ Extra credit solution::
    271272
    if DraggableRectangle.lock is not None: return
    272273
    contains, attrd = self.rect.contains(event)
    273274
    if not contains: return
    274-
    print 'event contains', self.rect.xy
    275+
    print('event contains', self.rect.xy)
    275276
    x0, y0 = self.rect.xy
    276277
    self.press = x0, y0, event.xdata, event.ydata
    277278
    DraggableRectangle.lock = self
    @@ -361,22 +362,22 @@ background that the mouse is over::
    361362
    import matplotlib.pyplot as plt
    362363

    363364
    def enter_axes(event):
    364-
    print 'enter_axes', event.inaxes
    365+
    print('enter_axes', event.inaxes)
    365366
    event.inaxes.patch.set_facecolor('yellow')
    366367
    event.canvas.draw()
    367368

    368369
    def leave_axes(event):
    369-
    print 'leave_axes', event.inaxes
    370+
    print('leave_axes', event.inaxes)
    370371
    event.inaxes.patch.set_facecolor('white')
    371372
    event.canvas.draw()
    372373

    373374
    def enter_figure(event):
    374-
    print 'enter_figure', event.canvas.figure
    375+
    print('enter_figure', event.canvas.figure)
    375376
    event.canvas.figure.patch.set_facecolor('red')
    376377
    event.canvas.draw()
    377378

    378379
    def leave_figure(event):
    379-
    print 'leave_figure', event.canvas.figure
    380+
    print('leave_figure', event.canvas.figure)
    380381
    event.canvas.figure.patch.set_facecolor('grey')
    381382
    event.canvas.draw()
    382383

    @@ -403,7 +404,6 @@ background that the mouse is over::
    403404
    plt.show()
    404405

    405406

    406-
    407407
    .. _object-picking:
    408408

    409409
    Object picking
    @@ -503,7 +503,8 @@ properties of the line. Here is the code::
    503503
    xdata = thisline.get_xdata()
    504504
    ydata = thisline.get_ydata()
    505505
    ind = event.ind
    506-
    print 'onpick points:', zip(xdata[ind], ydata[ind])
    506+
    points = tuple(zip(xdata[ind], ydata[ind]))
    507+
    print('onpick points:', points)
    507508

    508509
    fig.canvas.mpl_connect('pick_event', onpick)
    509510

    0 commit comments

    Comments
     (0)
    0