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

Commit96074c7

Browse files
authored
Merge pull request#10095 from anntzer/remove-debugging
MNT: Remove some debugging code.
2 parents355943e +10c48c9 commit96074c7

File tree

6 files changed

+4
-42
lines changed

6 files changed

+4
-42
lines changed

‎lib/matplotlib/backends/backend_gtkagg.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
frommatplotlib.backends._gtkaggimportagg_to_gtk_drawable
1818

1919

20-
DEBUG=False
21-
2220
classNavigationToolbar2GTKAgg(NavigationToolbar2GTK):
2321
def_get_canvas(self,fig):
2422
returnFigureCanvasGTKAgg(fig)
@@ -41,7 +39,6 @@ class FigureCanvasGTKAgg(FigureCanvasGTK, FigureCanvasAgg):
4139

4240
defconfigure_event(self,widget,event=None):
4341

44-
ifDEBUG:print('FigureCanvasGTKAgg.configure_event')
4542
ifwidget.windowisNone:
4643
return
4744
try:
@@ -58,14 +55,10 @@ def configure_event(self, widget, event=None):
5855
self.figure.set_size_inches(winch,hinch,forward=False)
5956
self._need_redraw=True
6057
self.resize_event()
61-
ifDEBUG:print('FigureCanvasGTKAgg.configure_event end')
6258
returnTrue
6359

6460
def_render_figure(self,pixmap,width,height):
65-
ifDEBUG:print('FigureCanvasGTKAgg.render_figure')
6661
FigureCanvasAgg.draw(self)
67-
ifDEBUG:print('FigureCanvasGTKAgg.render_figure pixmap',pixmap)
68-
#agg_to_gtk_drawable(pixmap, self.renderer._renderer, None)
6962

7063
buf=self.buffer_rgba()
7164
ren=self.get_renderer()
@@ -76,17 +69,12 @@ def _render_figure(self, pixmap, width, height):
7669
buf,gtk.gdk.COLORSPACE_RGB,True,8,w,h,w*4)
7770
pixmap.draw_pixbuf(pixmap.new_gc(),pixbuf,0,0,0,0,w,h,
7871
gtk.gdk.RGB_DITHER_NONE,0,0)
79-
ifDEBUG:print('FigureCanvasGTKAgg.render_figure done')
8072

8173
defblit(self,bbox=None):
82-
ifDEBUG:print('FigureCanvasGTKAgg.blit',self._pixmap)
8374
agg_to_gtk_drawable(self._pixmap,self.renderer._renderer,bbox)
84-
8575
x,y,w,h=self.allocation
86-
87-
self.window.draw_drawable (self.style.fg_gc[self.state],self._pixmap,
88-
0,0,0,0,w,h)
89-
ifDEBUG:print('FigureCanvasGTKAgg.done')
76+
self.window.draw_drawable(self.style.fg_gc[self.state],self._pixmap,
77+
0,0,0,0,w,h)
9078

9179
defprint_png(self,filename,*args,**kwargs):
9280
# Do this so we can save the resolution of figure in the PNG file

‎lib/matplotlib/backends/backend_ps.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,18 +1345,13 @@ def write(self, *kl, **kwargs):
13451345
paperHeight,
13461346
orientation)
13471347

1348-
ifrcParams['ps.usedistiller']=='ghostscript':
1348+
if (rcParams['ps.usedistiller']=='ghostscript'
1349+
orrcParams['text.usetex']):
13491350
gs_distill(tmpfile,isEPSF,ptype=papertype,bbox=bbox,
13501351
rotated=psfrag_rotated)
13511352
elifrcParams['ps.usedistiller']=='xpdf':
13521353
xpdf_distill(tmpfile,isEPSF,ptype=papertype,bbox=bbox,
13531354
rotated=psfrag_rotated)
1354-
elifrcParams['text.usetex']:
1355-
ifFalse:
1356-
pass# for debugging
1357-
else:
1358-
gs_distill(tmpfile,isEPSF,ptype=papertype,bbox=bbox,
1359-
rotated=psfrag_rotated)
13601355

13611356
ifis_writable_file_like(outfile):
13621357
iffile_requires_unicode(outfile):

‎lib/matplotlib/backends/qt_editor/formlayout.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444
__version__='1.0.10'
4545
__license__=__doc__
4646

47-
DEBUG=False
48-
4947
importcopy
5048
importdatetime
5149
importwarnings
@@ -222,12 +220,6 @@ def __init__(self, data, comment="", parent=None):
222220
ifcomment:
223221
self.formlayout.addRow(QtWidgets.QLabel(comment))
224222
self.formlayout.addRow(QtWidgets.QLabel(" "))
225-
ifDEBUG:
226-
print("\n"+("*"*80))
227-
print("DATA:",self.data)
228-
print("*"*80)
229-
print("COMMENT:",comment)
230-
print("*"*80)
231223

232224
defget_dialog(self):
233225
"""Return FormDialog instance"""
@@ -238,8 +230,6 @@ def get_dialog(self):
238230

239231
defsetup(self):
240232
forlabel,valueinself.data:
241-
ifDEBUG:
242-
print("value:",value)
243233
iflabelisNoneandvalueisNone:
244234
# Separator: (None, None)
245235
self.formlayout.addRow(QtWidgets.QLabel(" "),QtWidgets.QLabel(" "))

‎lib/matplotlib/offsetbox.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434

3535
frommatplotlibimportdocstring
3636

37-
#from bboximage import BboxImage
3837
frommatplotlib.imageimportBboxImage
3938

4039
frommatplotlib.patchesimportbbox_artistasmbbox_artist

‎lib/matplotlib/sankey.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -734,13 +734,6 @@ def _get_angle(a, r):
734734
vertices=translate(rotate(vertices))
735735
kwds=dict(s=patchlabel,ha='center',va='center')
736736
text=self.ax.text(*offset,**kwds)
737-
ifFalse:# Debug
738-
print("llpath\n",llpath)
739-
print("ulpath\n",self._revert(ulpath))
740-
print("urpath\n",urpath)
741-
print("lrpath\n",self._revert(lrpath))
742-
xs,ys=list(zip(*vertices))
743-
self.ax.plot(xs,ys,'go-')
744737
ifrcParams['_internal.classic_mode']:
745738
fc=kwargs.pop('fc',kwargs.pop('facecolor','#bfd1d4'))
746739
lw=kwargs.pop('lw',kwargs.pop('linewidth',0.5))

‎lib/matplotlib/transforms.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,9 +1909,6 @@ def __init__(self, matrix=None, **kwargs):
19091909
Affine2DBase.__init__(self,**kwargs)
19101910
ifmatrixisNone:
19111911
matrix=np.identity(3)
1912-
elifDEBUG:
1913-
matrix=np.asarray(matrix,float)
1914-
assertmatrix.shape== (3,3)
19151912
self._mtx=matrix
19161913
self._invalid=0
19171914

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp