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

Commiteba349a

Browse files
authored
Merge pull request#15211 from anntzer/backends_cleanups
Various backend cleanups.
2 parents2f6a7a4 +4a9f6a8 commiteba349a

File tree

6 files changed

+6
-20
lines changed

6 files changed

+6
-20
lines changed

‎lib/matplotlib/backends/backend_pdf.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,14 +2498,9 @@ class FigureCanvasPdf(FigureCanvasBase):
24982498
----------
24992499
figure : `matplotlib.figure.Figure`
25002500
A high-level Figure instance
2501-
25022501
"""
25032502

25042503
fixed_dpi=72
2505-
2506-
defdraw(self):
2507-
pass
2508-
25092504
filetypes= {'pdf':'Portable Document Format'}
25102505

25112506
defget_default_filetype(self):

‎lib/matplotlib/backends/backend_pgf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -946,14 +946,12 @@ def get_renderer(self):
946946
returnRendererPgf(self.figure,None)
947947

948948

949-
classFigureManagerPgf(FigureManagerBase):
950-
pass
949+
FigureManagerPgf=FigureManagerBase
951950

952951

953952
@_Backend.export
954953
class_BackendPgf(_Backend):
955954
FigureCanvas=FigureCanvasPgf
956-
FigureManager=FigureManagerPgf
957955

958956

959957
def_cleanup_all():

‎lib/matplotlib/backends/backend_ps.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,10 +748,6 @@ def swap_if_landscape(self, shape):
748748

749749
classFigureCanvasPS(FigureCanvasBase):
750750
fixed_dpi=72
751-
752-
defdraw(self):
753-
pass
754-
755751
filetypes= {'ps':'Postscript',
756752
'eps':'Encapsulated Postscript'}
757753

‎lib/matplotlib/backends/backend_qt5.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ def __init__(self, figure):
222222
_create_qApp()
223223
super().__init__(figure=figure)
224224

225-
self.figure=figure
226225
# We don't want to scale up the figure DPI more than once.
227226
# Note, we don't handle a signal for changing DPI yet.
228227
figure._original_dpi=figure.dpi

‎lib/matplotlib/backends/backend_template.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ def draw(self):
200200

201201
# If the file type is not in the base set of filetypes,
202202
# you should add it to the class-scope filetypes dictionary as follows:
203-
filetypes=FigureCanvasBase.filetypes.copy()
204-
filetypes['foo']='My magic Foo format'
203+
filetypes= {**FigureCanvasBase.filetypes,'foo':'My magic Foo format'}
205204

206205
defprint_foo(self,filename,*args,**kwargs):
207206
"""

‎lib/matplotlib/backends/backend_wx.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,12 +512,11 @@ class _FigureCanvasWxBase(FigureCanvasBase, wx.Panel):
512512

513513
def__init__(self,parent,id,figure):
514514
"""
515-
Initialise a FigureWx instance.
515+
Initialize a FigureWx instance.
516516
517-
- Initialise the FigureCanvasBase and wxPanel parents.
518-
- Set event handlers for:
519-
EVT_SIZE (Resize event)
520-
EVT_PAINT (Paint event)
517+
- Initialize the FigureCanvasBase and wxPanel parents.
518+
- Set event handlers for resize, paint, and keyboard and mouse
519+
interaction.
521520
"""
522521

523522
FigureCanvasBase.__init__(self,figure)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp