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

Skip to content

Commit e7b3b73

Browse files
committed
made the rc warnings a bit more readable
svn path=/trunk/matplotlib/; revision=2098
1 parent d923135 commit e7b3b73

7 files changed

Lines changed: 22 additions & 12 deletions

File tree

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2006-02-27 Made the rc deprecation warnings a little more human
2+
readable.
3+
14
2006-02-26 Update the previous gtk.main_quit() bug fix to use gtk.main_level()
25
- SC
36

agg23/include/agg_rasterizer_scanline_aa.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
//----------------------------------------------------------------------------
2929
#ifndef AGG_RASTERIZER_SCANLINE_AA_INCLUDED
3030
#define AGG_RASTERIZER_SCANLINE_AA_INCLUDED
31-
3231
#include <string.h>
3332
#include <math.h>
3433
#include "agg_basics.h"
@@ -460,12 +459,12 @@ namespace agg
460459
{
461460
double x;
462461
double y;
463-
464462
unsigned cmd;
465463
vs.rewind(path_id);
464+
//boyle freeze appears to be in !is_stop(cmd = vs.vertex(&x, &y))
466465
while(!is_stop(cmd = vs.vertex(&x, &y)))
467466
{
468-
add_vertex(x, y, cmd);
467+
add_vertex(x, y, cmd);
469468
}
470469
}
471470

examples/simple_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
grid(True)
1616

1717
#savefig('simple_plot.png')
18-
#savefig('simple_plot')
18+
savefig('simple_plot')
1919

2020
show()

lib/matplotlib/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,12 @@ def validate_key(key, val, line, cnt, fname, fail_on_error):
908908
key = alt
909909

910910
if not defaultParams.has_key(key):
911-
warnings.warn('Bad key "%s" on line %d in %s' % (key, cnt, fname))
911+
print >> sys.stderr, """\
912+
Bad key "%s" on line %d in
913+
%s.
914+
You probably need to get an updated matplotlibrc file from
915+
http://matplotlib.sf.net/matplotlibrc or from the matplotlib src
916+
distribution""" % (key, cnt, fname)
912917
return None
913918

914919
default, converter = defaultParams[key]

lib/matplotlib/backends/backend_agg.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,10 @@ def __init__(self, width, height, dpi):
112112
self.dpi = dpi
113113
self.width = width
114114
self.height = height
115+
if __debug__: verbose.report('RendererAgg.__init__ width=%s, height=%s'%(width, height), 'debug-annoying')
115116
self._renderer = _RendererAgg(int(width), int(height), dpi.get(),
116117
debug=False)
118+
if __debug__: verbose.report('RendererAgg.__init__ _RendererAgg done', 'debug-annoying')
117119
self.draw_polygon = self._renderer.draw_polygon
118120
self.draw_rectangle = self._renderer.draw_rectangle
119121
self.draw_path = self._renderer.draw_path
@@ -132,9 +134,10 @@ def __init__(self, width, height, dpi):
132134
self.texmanager = TexManager()
133135

134136
self.bbox = lbwh_to_bbox(0,0, self.width, self.height)
137+
if __debug__: verbose.report('RendererAgg.__init__ done', 'debug-annoying')
135138

136139
def draw_arc(self, gcEdge, rgbFace, x, y, width, height, angle1, angle2):
137-
"""
140+
"""
138141
Draw an arc centered at x,y with width and height and angles
139142
from 0.0 to 360.0
140143

lib/matplotlib/backends/backend_emf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
try:
99
import pyemf
1010
except ImportError:
11+
import sys
1112
print >>sys.stderr, 'You must first install pyemf from http://pyemf.sf.net'
1213
sys.exit()
1314

src/_backend_agg.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,14 +1328,15 @@ RendererAgg::draw_lines(const Py::Tuple& args) {
13281328
path.line_to(thisx, thisy);
13291329

13301330
moveto = false;
1331-
1331+
//std::cout << "draw lines " << thisx << " " << thisy << std::endl;
13321332
}
13331333

13341334
Py_XDECREF(xa);
13351335
Py_XDECREF(ya);
13361336

13371337
//typedef agg::conv_transform<agg::path_storage, agg::trans_affine> path_t;
13381338
//path_t transpath(path, xytrans);
1339+
_VERBOSE("RendererAgg::draw_lines rendering lines path");
13391340
_render_lines_path(path, gc);
13401341

13411342
_VERBOSE("RendererAgg::draw_lines DONE");
@@ -1346,15 +1347,15 @@ RendererAgg::draw_lines(const Py::Tuple& args) {
13461347
template<class PathSource>
13471348
void
13481349
RendererAgg::_render_lines_path(PathSource &path, const GCAgg& gc) {
1349-
1350+
_VERBOSE("RendererAgg::_render_lines_path");
13501351
typedef PathSource path_t;
13511352
//typedef agg::conv_transform<agg::path_storage, agg::trans_affine> path_t;
13521353
typedef agg::conv_stroke<path_t> stroke_t;
13531354
typedef agg::conv_dash<path_t> dash_t;
13541355

13551356
//path_t transpath(path, xytrans);
13561357

1357-
if (gc.dasha==NULL ) { //no dashes
1358+
if (gc.dasha==NULL ) { //no dashes
13581359
stroke_t stroke(path);
13591360
stroke.width(gc.linewidth);
13601361
stroke.line_cap(gc.cap);
@@ -1374,8 +1375,7 @@ RendererAgg::_render_lines_path(PathSource &path, const GCAgg& gc) {
13741375
stroke.line_cap(gc.cap);
13751376
stroke.line_join(gc.join);
13761377
stroke.width(gc.linewidth);
1377-
theRasterizer->add_path(stroke);
1378-
1378+
theRasterizer->add_path(stroke); //boyle freeze is herre
13791379
}
13801380

13811381
if ( gc.isaa ) {
@@ -1386,7 +1386,6 @@ RendererAgg::_render_lines_path(PathSource &path, const GCAgg& gc) {
13861386
rendererBin->color(gc.color);
13871387
agg::render_scanlines(*theRasterizer, *slineBin, *rendererBin);
13881388
}
1389-
13901389
}
13911390

13921391
/*

0 commit comments

Comments
 (0)