Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fbafa13

Browse files
committed
Merge remote-tracking branch 'matplotlib/v2.x'
2 parents f6effa8 + fe720e2 commit fbafa13

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+110
-3179
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
GTK and GDK backends deprecated
2+
```````````````````````````````
3+
The untested and broken GDK and GTK backends have been deprecated.
4+
These backends allows figures to be rendered via the GDK api to
5+
files and GTK2 figures. They are untested, known to be broken and
6+
use have been discouraged for some time. The `GTKAgg` and `GTKCairo` backends
7+
provide better and more tested ways of rendering figures to GTK2 windows.
8+
9+
WX backend deprecated
10+
`````````````````````
11+
The untested WX backend has been deprecated.
12+
This backend allows figures to be rendered via the WX api to
13+
files and Wx figures. It is untested, and
14+
use have been discouraged for some time. The `WXAgg` backend
15+
provides a better and more tested way of rendering figures to WX windows.
16+
17+
CocoaAgg backend removed
18+
````````````````````````
19+
20+
The deprecated and not fully functional CocoaAgg backend has been removed

doc/faq/usage_faq.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,10 @@ renderer for user interfaces is ``Agg`` which uses the `Anti-Grain
370370
Geometry`_ C++ library to make a raster (pixel) image of the figure.
371371
All of the user interfaces except ``macosx`` can be used with
372372
agg rendering, e.g.,
373-
``WXAgg``, ``GTKAgg``, ``QT4Agg``, ``TkAgg``. In
373+
``WXAgg``, ``GTKAgg``, ``QT4Agg``, ``QT5Agg``, ``TkAgg``. In
374374
addition, some of the user interfaces support other rendering engines.
375375
For example, with GTK, you can also select GDK rendering (backend
376-
``GTK``) or Cairo rendering (backend ``GTKCairo``).
376+
``GTK`` deprecated in 2.0) or Cairo rendering (backend ``GTKCairo``).
377377

378378
For the rendering engines, one can also distinguish between `vector
379379
<http://en.wikipedia.org/wiki/Vector_graphics>`_ or `raster
@@ -404,7 +404,7 @@ SVG :term:`svg` :term:`vector graphics` --
404404
:term:`svg`
405405
...
406406
:term:`GDK` :term:`png` :term:`raster graphics` --
407-
:term:`jpg` the `Gimp Drawing Kit`_
407+
:term:`jpg` the `Gimp Drawing Kit`_ Deprecated in 2.0
408408
:term:`tiff`
409409
...
410410
============= ============ ================================================
@@ -421,16 +421,17 @@ GTKAgg Agg rendering to a :term:`GTK` 2.x canvas (requires PyGTK_ and
421421
pycairo_ or cairocffi_; Python2 only)
422422
GTK3Agg Agg rendering to a :term:`GTK` 3.x canvas (requires PyGObject_
423423
and pycairo_ or cairocffi_)
424-
GTK GDK rendering to a :term:`GTK` 2.x canvas (not recommended)
425-
(requires PyGTK_ and pycairo_ or cairocffi_; Python2 only)
424+
GTK GDK rendering to a :term:`GTK` 2.x canvas (not recommended and d
425+
eprecated in 2.0) (requires PyGTK_ and pycairo_ or cairocffi_;
426+
Python2 only)
426427
GTKCairo Cairo rendering to a :term:`GTK` 2.x canvas (requires PyGTK_
427428
and pycairo_ or cairocffi_; Python2 only)
428429
GTK3Cairo Cairo rendering to a :term:`GTK` 3.x canvas (requires PyGObject_
429430
and pycairo_ or cairocffi_)
430431
WXAgg Agg rendering to to a :term:`wxWidgets` canvas
431432
(requires wxPython_)
432433
WX Native :term:`wxWidgets` drawing to a :term:`wxWidgets` Canvas
433-
(not recommended) (requires wxPython_)
434+
(not recommended and deprecated in 2.0) (requires wxPython_)
434435
TkAgg Agg rendering to a :term:`Tk` canvas (requires TkInter_)
435436
Qt4Agg Agg rendering to a :term:`Qt4` canvas (requires PyQt4_ or ``pyside``)
436437
Qt5Agg Agg rendering in a :term:`Qt5` canvas (requires PyQt5_)

doc/users/screenshots.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ rendering of strings with the *usetex* option.
279279
EEG demo
280280
=========
281281

282-
You can embed matplotlib into pygtk, wx, Tk, FLTK, or Qt applications.
282+
You can embed matplotlib into pygtk, wx, Tk, or Qt applications.
283283
Here is a screenshot of an EEG viewer called `pbrain
284284
<http://github.com/nipy/pbrain>`__.
285285

examples/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ directories found here:
4040
* units - working with unit data an custom types in matplotlib
4141

4242
* user_interfaces - using matplotlib in a GUI application, e.g.,
43-
TkInter, WXPython, pygtk, pyqt or FLTK widgets
43+
TkInter, WXPython, pygtk, pyqt widgets
4444

4545
* widgets - Examples using interactive widgets

examples/color/color_cycle_default.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
"""
2+
Display the colors from the default prop_cycle.
3+
"""
4+
5+
import numpy as np
6+
import matplotlib.pyplot as plt
7+
8+
prop_cycle = plt.rcParams['axes.prop_cycle']
9+
colors = prop_cycle.by_key()['color']
10+
11+
lwbase = plt.rcParams['lines.linewidth']
12+
thin = float('%.1f' % (lwbase / 2))
13+
thick = lwbase * 3
14+
15+
fig, axs = plt.subplots(nrows=2, ncols=2, sharex=True, sharey=True)
16+
for icol in range(2):
17+
if icol == 0:
18+
lwx, lwy = thin, lwbase
19+
else:
20+
lwx, lwy = lwbase, thick
21+
for irow in range(2):
22+
for i, color in enumerate(colors):
23+
axs[irow, icol].axhline(i, color=color, lw=lwx)
24+
axs[irow, icol].axvline(i, color=color, lw=lwy)
25+
26+
axs[1, icol].set_facecolor('k')
27+
axs[1, icol].xaxis.set_ticks(np.arange(0, 10, 2))
28+
axs[0, icol].set_title('line widths (pts): %.1f, %.1f' % (lwx, lwy),
29+
fontsize='medium')
30+
31+
for irow in range(2):
32+
axs[irow, 0].yaxis.set_ticks(np.arange(0, 10, 2))
33+
34+
fig.suptitle('Colors in the default prop_cycle', fontsize='large')
35+
36+
plt.show()

examples/event_handling/test_mouseclicks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#matplotlib.use("TkAgg")
66
#matplotlib.use("GTKAgg")
77
#matplotlib.use("Qt4Agg")
8-
#matplotlib.use("CocoaAgg")
98
#matplotlib.use("MacOSX")
109
import matplotlib.pyplot as plt
1110

examples/tests/backend_driver.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
pylab=os.path.join('..', 'pylab_examples'),
4444
api=os.path.join('..', 'api'),
4545
units=os.path.join('..', 'units'),
46-
mplot3d=os.path.join('..', 'mplot3d'))
46+
mplot3d=os.path.join('..', 'mplot3d'),
47+
colors=os.path.join('..', 'color'))
4748

4849

4950
# files in each dir
@@ -64,6 +65,7 @@
6465
]
6566

6667
files['colors'] = [
68+
'color_cycle_default.py',
6769
'color_cycle_demo.py',
6870
]
6971

examples/user_interfaces/README.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ Embedding matplotlib in graphical user interfaces
33

44
You can embed matplotlib directly into a user interface application by
55
following the embedding_in_SOMEGUI.py examples here. Currently
6-
matplotlib supports wxpython, pygtk, tkinter, pyqt, fltk and cocoa.
6+
matplotlib supports wxpython, pygtk, tkinter and pyqt4/5.
77

88
When embedding matplotlib in a GUI, you must use the matplotlib API
99
directly rather than the pylab/pyplot proceedural interface, so take a
1010
look at the examples/api directory for some example code working with
1111
the API.
12-
13-

lib/matplotlib/backends/Matplotlib.nib/classes.nib

Lines changed: 0 additions & 59 deletions
This file was deleted.

lib/matplotlib/backends/Matplotlib.nib/info.nib

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)