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

Skip to content

Commit d6e93a3

Browse files
committed
Fix review items.
1 parent 4987e3c commit d6e93a3

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

examples/user_interfaces/pylab_with_gtk_sgskip.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import gi
2626
gi.require_version('Gtk', '3.0')
2727
from gi.repository import Gtk
28-
next = 8 # where to insert this in the mpl toolbar
28+
pos = 8 # where to insert this in the mpl toolbar
2929
button = Gtk.Button('Click me')
3030
button.show()
3131

@@ -39,8 +39,8 @@ def clicked(button):
3939
toolitem.set_tooltip_text('Click me for fun and profit')
4040

4141
toolitem.add(button)
42-
toolbar.insert(toolitem, next)
43-
next += 1
42+
toolbar.insert(toolitem, pos)
43+
pos += 1
4444

4545
# now let's add a widget to the vbox
4646
label = Gtk.Label()

examples/widgets/cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
ax.set_xlim(-2, 2)
2121
ax.set_ylim(-2, 2)
2222

23-
# Set useblit=True on some backends for enhanced performance.
23+
# Set useblit=True on most backends for enhanced performance.
2424
cursor = Cursor(ax, useblit=True, color='red', linewidth=2)
2525

2626
plt.show()

examples/widgets/span_selector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def onselect(xmin, xmax):
3838
ax2.set_ylim(thisy.min(), thisy.max())
3939
fig.canvas.draw()
4040

41-
# Set useblit=True on some backends for enhanced performance.
41+
# Set useblit=True on most backends for enhanced performance.
4242
span = SpanSelector(ax1, onselect, 'horizontal', useblit=True,
4343
rectprops=dict(alpha=0.5, facecolor='red'))
4444

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ def _backend_selection():
9797
rcParams['backend'] = 'qt5Agg'
9898
elif 'gtk' in sys.modules and 'gi' in sys.modules:
9999
from gi.repository import GObject
100-
ml = GObject.MainLoop
101-
if ml().is_running():
100+
if GObject.MainLoop().is_running():
102101
rcParams['backend'] = 'GTK3Agg'
103102
elif 'Tkinter' in sys.modules and not backend == 'TkAgg':
104103
# import Tkinter

0 commit comments

Comments
 (0)