Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Delete deprecated backends#10426

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
efiring merged 10 commits intomatplotlib:masterfromQuLogic:delete-backends
Mar 5, 2018
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletionINSTALL.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -159,7 +159,6 @@ optional Matplotlib backends and the capabilities they provide.
* `PyQt4 <https://pypi.python.org/pypi/PyQt4>`_ (>= 4.4) or
`PySide <https://pypi.python.org/pypi/PySide>`_: for the Qt4Agg backend;
* `PyQt5 <https://pypi.python.org/pypi/PyQt5>`_: for the Qt5Agg backend;
* :term:`pygtk` (>= 2.4): for the GTK and the GTKAgg backend;
* :term:`wxpython` (>= 2.9 or later): for the WX or WXAgg backend;
* `cairocffi <https://cairocffi.readthedocs.io/en/latest/>`__ (>=
v0.8): for cairo based backends;
Expand Down
1 change: 0 additions & 1 deletionMANIFEST.in
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@ include pytest.ini
include Makefile MANIFEST.in
include matplotlibrc.template setup.cfg.template
include setupext.py setup.py distribute_setup.py
include lib/matplotlib/mpl-data/lineprops.glade
include lib/matplotlib/mpl-data/matplotlibrc
include lib/matplotlib/mpl-data/images/*
include lib/matplotlib/mpl-data/fonts/ttf/*
Expand Down
11 changes: 0 additions & 11 deletionsdoc/api/backend_gtkagg_api.rst
View file
Open in desktop

This file was deleted.

11 changes: 0 additions & 11 deletionsdoc/api/backend_gtkcairo_api.rst
View file
Open in desktop

This file was deleted.

2 changes: 0 additions & 2 deletionsdoc/api/index_backend_api.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,8 +10,6 @@ backends
backend_tools_api.rst
backend_agg_api.rst
backend_cairo_api.rst
backend_gtkagg_api.rst
backend_gtkcairo_api.rst
backend_gtk3agg_api.rst
backend_gtk3cairo_api.rst
backend_nbagg_api.rst
Expand Down
9 changes: 9 additions & 0 deletionsdoc/api/next_api_changes/2018-02-16-ES-removals.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
Removal of deprecated backends
------------------------------

Deprecated backends have been removed:

* GTKAgg
* GTKCairo
* GTK
* GDK
11 changes: 2 additions & 9 deletionsdoc/glossary/index.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -74,16 +74,9 @@ Glossary
features of PyGObject. However Matplotlib does not use any of these
missing features.

pygtk
`pygtk <http://www.pygtk.org/>`_ provides python wrappers for
the :term:`GTK` widgets library for use with the GTK or GTKAgg
backend. Widely used on linux, and is often packages as
'python-gtk2'

PyGObject
Like :term:`pygtk`, `PyGObject <http://www.pygtk.org/>` provides
python wrappers for the :term:`GTK` widgets library; unlike pygtk,
PyGObject wraps GTK3 instead of the now obsolete GTK2.
`PyGObject <http://www.pygtk.org/>`_ provides Python wrappers for the
:term:`GTK` widgets library

pyqt
`pyqt <https://wiki.python.org/moin/PyQt>`_ provides python
Expand Down
25 changes: 14 additions & 11 deletionsdoc/users/navigation_toolbar.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -109,31 +109,34 @@ automatically for every figure. If you are writing your own user
interface code, you can add the toolbar as a widget. The exact syntax
depends on your UI, but we have examples for every supported UI in the
``matplotlib/examples/user_interfaces`` directory. Here is some
example code for GTK::
example code for GTK+ 3::


import gtk
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

from matplotlib.figure import Figure
from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar
from matplotlib.backends.backend_gtk3agg import FigureCanvas
from matplotlib.backends.backend_gtk3 import (
NavigationToolbar2GTK3 as NavigationToolbar)

win =gtk.Window()
win.connect("destroy", lambda x:gtk.main_quit())
win =Gtk.Window()
win.connect("destroy", lambda x:Gtk.main_quit())
win.set_default_size(400,300)
win.set_title("Embedding in GTK")

vbox =gtk.VBox()
vbox =Gtk.VBox()
win.add(vbox)

fig = Figure(figsize=(5,4), dpi=100)
ax = fig.add_subplot(111)
ax.plot([1,2,3])

canvas = FigureCanvas(fig) # agtk.DrawingArea
vbox.pack_start(canvas)
canvas = FigureCanvas(fig) # aGtk.DrawingArea
vbox.pack_start(canvas, True, True, 0)
toolbar = NavigationToolbar(canvas, win)
vbox.pack_start(toolbar, False, False)
vbox.pack_start(toolbar, False, False, 0)

win.show_all()
gtk.main()
Gtk.main()
2 changes: 1 addition & 1 deletiondoc/users/shell.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,7 +100,7 @@ up python. Then::
>>> xlabel('hi mom')

should work out of the box. This is also likely to work with recent
versions of the qt4agg andgtkagg backends, and with the macosx backend
versions of the qt4agg andgtk3agg backends, and with the macosx backend
on the Macintosh. Note, in batch mode,
i.e. when making
figures from scripts, interactive mode can be slow since it redraws
Expand Down
2 changes: 1 addition & 1 deletionexamples/event_handling/ginput_manual_clabel_sgskip.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
waitforbuttonpress and manual clabel placement.

This script must be run interactively using a backend that has a
graphical user interface (for example, usingGTKAgg backend, but not
graphical user interface (for example, usingGTK3Agg backend, but not
PS backend).

See also ginput_demo.py
Expand Down
55 changes: 0 additions & 55 deletionsexamples/user_interfaces/embedding_in_gtk2_sgskip.py
View file
Open in desktop

This file was deleted.

View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,8 @@
Demonstrate NavigationToolbar with GTK3 accessed via pygobject.
"""

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

from matplotlib.backends.backend_gtk3 import (
Expand Down
2 changes: 2 additions & 0 deletionsexamples/user_interfaces/embedding_in_gtk3_sgskip.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,8 @@
GTK3 accessed via pygobject.
"""

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

from matplotlib.backends.backend_gtk3agg import (
Expand Down
36 changes: 0 additions & 36 deletionsexamples/user_interfaces/embedding_in_gtk_sgskip.py
View file
Open in desktop

This file was deleted.

55 changes: 27 additions & 28 deletionsexamples/user_interfaces/gtk_spreadsheet_sgskip.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,55 +8,54 @@
data

"""
importpygtk
pygtk.require('2.0')
import gtk
fromgtk importgdk
importgi
gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0')
fromgi.repository importGtk, Gdk

import matplotlib
matplotlib.use('GTKAgg') # or 'GTK'
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtk3agg import FigureCanvas
# from matplotlib.backends.backend_gtk3cairo import FigureCanvas

from numpy.random import random
from matplotlib.figure import Figure


class DataManager(gtk.Window):
class DataManager(Gtk.Window):
numRows, numCols = 20, 10

data = random((numRows, numCols))

def __init__(self):
gtk.Window.__init__(self)
Gtk.Window.__init__(self)
self.set_default_size(600, 600)
self.connect('destroy', lambda win:gtk.main_quit())
self.connect('destroy', lambda win:Gtk.main_quit())

self.set_title('GtkListStore demo')
self.set_border_width(8)

vbox =gtk.VBox(False, 8)
vbox =Gtk.VBox(False, 8)
self.add(vbox)

label =gtk.Label('Double click a row to plot the data')
label =Gtk.Label('Double click a row to plot the data')

vbox.pack_start(label, False, False)
vbox.pack_start(label, False, False, 0)

sw =gtk.ScrolledWindow()
sw.set_shadow_type(gtk.SHADOW_ETCHED_IN)
sw.set_policy(gtk.POLICY_NEVER,
gtk.POLICY_AUTOMATIC)
vbox.pack_start(sw, True, True)
sw =Gtk.ScrolledWindow()
sw.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
sw.set_policy(Gtk.PolicyType.NEVER,
Gtk.PolicyType.AUTOMATIC)
vbox.pack_start(sw, True, True, 0)

model = self.create_model()

self.treeview =gtk.TreeView(model)
self.treeview =Gtk.TreeView(model)
self.treeview.set_rules_hint(True)

# matplotlib stuff
fig = Figure(figsize=(6, 4))

self.canvas = FigureCanvas(fig) # agtk.DrawingArea
vbox.pack_start(self.canvas, True, True)
self.canvas = FigureCanvas(fig) # aGtk.DrawingArea
vbox.pack_start(self.canvas, True, True, 0)
ax = fig.add_subplot(111)
self.line, = ax.plot(self.data[0, :], 'go') # plot the first row

Expand All@@ -65,9 +64,9 @@ def __init__(self):

self.add_columns()

self.add_events(gdk.BUTTON_PRESS_MASK |
gdk.KEY_PRESS_MASK |
gdk.KEY_RELEASE_MASK)
self.add_events(Gdk.EventMask.BUTTON_PRESS_MASK |
Gdk.EventMask.KEY_PRESS_MASK |
Gdk.EventMask.KEY_RELEASE_MASK)

def plot_row(self, treeview, path, view_column):
ind, = path # get the index into data
Expand All@@ -77,18 +76,18 @@ def plot_row(self, treeview, path, view_column):

def add_columns(self):
for i in range(self.numCols):
column =gtk.TreeViewColumn('%d' % i, gtk.CellRendererText(), text=i)
column =Gtk.TreeViewColumn(str(i), Gtk.CellRendererText(), text=i)
self.treeview.append_column(column)

def create_model(self):
types = [float]*self.numCols
store =gtk.ListStore(*types)
store =Gtk.ListStore(*types)

for row in self.data:
store.append(row)
store.append(tuple(row))
return store


manager = DataManager()
manager.show_all()
gtk.main()
Gtk.main()
30 changes: 0 additions & 30 deletionsexamples/user_interfaces/lineprops_dialog_gtk_sgskip.py
View file
Open in desktop

This file was deleted.

Loading

[8]ページ先頭

©2009-2025 Movatter.jp