8000 Merge pull request #23495 from QuLogic/fix-sgskip · matplotlib/matplotlib@cd66bfd · GitHub
[go: up one dir, main page]

Skip to content

Commit cd66bfd

Browse files
authored
Merge pull request #23495 from QuLogic/fix-sgskip
Fix sgskip'd examples
2 parents 87595b9 + c677fa9 commit cd66bfd

File tree

6 files changed

+10
-11
lines changed

6 files changed

+10
-11
lines changed

examples/misc/image_thumbnail_sgskip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
description="Build thumbnails of all images in a directory.")
2121
parser.add_argument("imagedir", type=Path)
2222
args = parser.parse_args()
23-
if not args.imagedir.isdir():
23+
if not args.imagedir.is_dir():
2424
sys.exit(f"Could not find input directory {args.imagedir}")
2525

2626
outdir = Path("thumbs")

examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
vbox.pack_start(canvas, True, True, 0)
3737

3838
# Create toolbar
39-
toolbar = NavigationToolbar(canvas, win)
39+
toolbar = NavigationToolbar(canvas)
4040
vbox.pack_start(toolbar, False, False, 0)
4141

4242
win.show_all()

examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def on_activate(app):
3939
vbox.append(canvas)
4040

4141
# Create toolbar
42-
toolbar = NavigationToolbar(canvas, win)
42+
toolbar = NavigationToolbar(canvas)
4343
vbox.append(toolbar)
4444

4545
win.show()

examples/user_interfaces/embedding_in_wx5_sgskip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import wx.lib.agw.aui as aui
1010
import wx.lib.mixins.inspection as wit
1111

12-
import matplotlib as mpl
12+
from matplotlib.figure import Figure
1313
from matplotlib.backends.backend_wxagg import (
1414
FigureCanvasWxAgg as FigureCanvas,
1515
NavigationToolbar2WxAgg as NavigationToolbar)
@@ -18,7 +18,7 @@
1818
class Plot(wx.Panel):
1919
def __init__(self, parent, id=-1, dpi=None, **kwargs):
2020
super().__init__(parent, id=id, **kwargs)
21-
self.figure = mpl.figure.Figure(dpi=dpi, figsize=(2, 2))
21+
self.figure = Figure(dpi=dpi, figsize=(2, 2))
2222
self.canvas = FigureCanvas(self, -1, self.figure)
2323
self.toolbar = NavigationToolbar(self.canvas)
2424
self.toolbar.Realize()

examples/user_interfaces/fourier_demo_wx_sgskip.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ def __init__(self, parent, label, param):
7575

7676
sizer = wx.BoxSizer(wx.HORIZONTAL)
7777
sizer.Add(self.sliderLabel, 0,
78-
wx.EXPAND | wx.ALIGN_CENTER | wx.ALL,
78+
wx.EXPAND | wx.ALL,
7979
border=2)
8080
sizer.Add(self.sliderText, 0,
81-
wx.EXPAND | wx.ALIGN_CENTER | wx.ALL,
81+
wx.EXPAND | wx.ALL,
8282
border=2)
8383
sizer.Add(self.slider, 1, wx.EXPAND)
8484
self.sizer = sizer
@@ -115,9 +115,9 @@ def __init__(self, *args, **kwargs):
115115
sizer = wx.BoxSizer(wx.VERTICAL)
116116
sizer.Add(self.canvas, 1, wx.EXPAND)
117117
sizer.Add(self.frequencySliderGroup.sizer, 0,
118-
wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=5)
118+
wx.EXPAND | wx.ALL, border=5)
119119
sizer.Add(self.amplitudeSliderGroup.sizer, 0,
120-
wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=5)
120+
wx.EXPAND | wx.ALL, border=5)
121121
panel.SetSizer(sizer)
122122

123123
def createCanvas(self, parent):

examples/user_interfaces/mathtext_wx_sgskip.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import numpy as np
1616
import wx
1717

18-
IS_GTK = 'wxGTK' in wx.PlatformInfo
1918
IS_WIN = 'wxMSW' in wx.PlatformInfo
2019

2120

@@ -66,7 +65,7 @@ def __init__(self, parent, title):
6665
menuBar.Append(menu, "&File")
6766
self.Bind(wx.EVT_MENU, self.OnClose, m_exit)
6867

69-
if IS_GTK or IS_WIN:
68+
if IS_WIN:
7069
# Equation Menu
7170
menu = wx.Menu()
7271
for i, (mt, func) in enumerate(functions):

0 commit comments

Comments
 (0)
0