Hi, I've got a problem some days ago doing saving the plots with certain resolution (dpi) under windows. In this maillist I've found that in some cases dpi parameter is defined in the source code. Moreover, there are more then _one_ definition of that parameter in matplotlib. Can we get rid of this behaviour? It's quite confusing till one starts browse the code by his own. For example I see absolutely no reasons to have more then one such a parameter. And it should be defined only one time in the matplotlibrc.
Look at this. Is it not ugly ??? backend_bases.py: def print_figure(self, filename, dpi=300, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): backends/backend_agg2.py: def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): backends/backend_agg.py: def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): backends/backend_cairo.py: class FigureCanvasCairo (FigureCanvasBase): def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): def _save_ps_pdf (self, figure, filename, ext, orientation, **kwargs): orientation = kwargs.get('orientation', 'portrait') dpi = 72 backends/backend_emf.py: hackoffsetper300dpi=10 xhack=math.sin(angle*math.pi/180.0)*hackoffsetper300dpi*self.dpi/300.0 yhack=math.cos(angle*math.pi/180.0)*hackoffsetper300dpi*self.dpi/300.0 def print_figure(self, filename, dpi=300, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): backends/backend_fltkagg.py: def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): backends/backend_gdk.py: def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): backends/backend_gd.py: PIXELS_PER_INCH = 96 # constant GD uses for screen DPI class FigureCanvasGD(FigureCanvasBase): def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): backends/backend_gtkagg.py: def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): backends/backend_gtk.py: def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): backends/backend_paint.py: #paint/font.c defined dpi as 96 PIXELS_PER_INCH = 96 # a constant used to scale text with dpi def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait, '**kwargs): backends/backend_pdf.py: def print_figure(self, filename, dpi=72, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): self.figure.dpi.set(72) backends/backend_ps.py: def print_figure(self, outfile, dpi=72, facecolor='w', edgecolor='w', orientation='portrait', papertype=None) self.figure.dpi.set(72) # ignore the dpi kwarg backends/backend_qt4agg.py: def print_figure( self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs ): backends/backend_qtagg.py: def print_figure( self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs ): backends/backend_svg.py: self.figure.dpi.set(72) backends/backend_template.py: def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): backends/backend_tkagg.py: def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): self.canvas.print_figure(fname, dpi=300) backends/backend_wxagg.py: def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): backends/backend_wx.py: def print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait', **kwargs): ps.figure.dpi.set(72) __init__.py: 'figure.dpi' : [ 80, validate_float], # DPI 'savefig.dpi' : [ 150, validate_float], # DPI 'ps.distiller.res' : [6000, validate_int], # dpi mathtext.py: w, h, fonts = math_parse_s_ft2font(s, dpi=27, fontsize=12, angle=0) if get_backend()=='PS': dpi = 72 matplotlibrc: figure.dpi : 80 # figure dots per inch savefig.dpi : 100 # figure dots per inch ps.distiller.res : 6000 # dpi It is just a mess! Please do something with that! -- Zack ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users