1
+
2
+ Changed the internal structure of contour.py to a more OO style.
3
+ Calls to contour or contourf in axes.py or pylab.py now return
4
+ a ContourSet object which contains references to the
5
+ LineCollections or PolyCollections created by the call,
6
+ as well as the configuration variables that were used.
7
+ The ContourSet object is a "mappable" if a colormap was used.
8
+
9
+ Added a clip_ends kwarg to contourf. From the docstring:
10
+ * clip_ends = True
11
+ If False, the limits for color scaling are set to the
12
+ minimum and maximum contour levels.
13
+ True (default) clips the scaling limits. Example:
14
+ if the contour boundaries are V = [-100, 2, 1, 0, 1, 2, 100],
15
+ then the scaling limits will be [-100, 100] if clip_ends
16
+ is False, and [-3, 3] if clip_ends is True.
17
+
18
+ Changed Figure.colorbar():
19
+ kw argument order changed;
20
+ if mappable arg is a non-filled ContourSet, colorbar() shows
21
+ lines instead of polygons.
22
+ if mappable arg is a filled ContourSet with clip_ends=True,
23
+ the endpoints are not labelled, so as to give the
24
+ correct impression of open-endedness.
25
+
26
+ Changed LineCollection.get_linewidths to get_linewidth, for
27
+ consistency.
28
+
29
+
1
30
API Changes in matplotlib-0.84
2
31
3
- Unified argument handling between hlines and vlines. Both now
32
+ Unified argument handling between hlines and vlines. Both now
4
33
take optionally a fmt argument (as in plot) and a keyword args
5
34
that can be passed onto Line2D.
6
35
@@ -32,13 +61,13 @@ API Changes in matplotlib-0.83
32
61
33
62
from backends import pylab_setup
34
63
new_figure_manager, draw_if_interactive, show = pylab_setup()
35
-
64
+
36
65
- Moved Figure.get_width_height() to FigureCanvasBase. It now
37
66
returns int instead of float.
38
67
39
68
API Changes in matplotlib-0.82
40
69
41
- - toolbar import change in GTKAgg, GTKCairo and WXAgg
70
+ - toolbar import change in GTKAgg, GTKCairo and WXAgg
42
71
43
72
- Added subplot config tool to GTK* backends -- note you must now
44
73
import the NavigationToolbar2 from your backend of choice rather
@@ -47,7 +76,7 @@ API Changes in matplotlib-0.82
47
76
wx backend -- see examples/embedding_in_wxagg.py
48
77
49
78
50
- - hist bin change
79
+ - hist bin change
51
80
52
81
Sean Richards notes there was a problem in the way we created
53
82
the binning for histogram, which made the last bin
@@ -63,7 +92,7 @@ API Changes in matplotlib-0.82
63
92
each bin? (i.e. each value should be the lower bound of a
64
93
bin). To provide the correct bins for hist would it not be
65
94
something like
66
-
95
+
67
96
def bins(xmin, xmax, N):
68
97
if N==1: return xmax
69
98
dx = (xmax-xmin)/N # instead of N-1
@@ -159,7 +188,7 @@ API CHANGES in matplotlib-0.72
159
188
consistency with set/get introspection mechanism,
160
189
161
190
- pylab figure now defaults to num=None, which creates a new figure
162
- with a guaranteed unique number
191
+ with a guaranteed unique number
163
192
164
193
- contour method syntax changed - now it is matlab compatible
165
194
@@ -181,7 +210,7 @@ API CHANGES in matplotlib-0.72
181
210
do not want this behavior, use fig.add_subplot or the axes
182
211
command
183
212
184
- API CHANGES in matplotlib-0.71
213
+ API CHANGES in matplotlib-0.71
185
214
186
215
Significant numerix namespace changes, introduced to resolve
187
216
namespace clashes between python built-ins and mlab names.
@@ -261,7 +290,7 @@ API CHANGES in matplotlib-0.63
261
290
262
291
Most of the date tick locators have a different meaning in their
263
292
constructors. In the prior implementation, the first argument was a
264
- base and multiples of the base were ticked. Eg
293
+ base and multiples of the base were ticked. Eg
265
294
266
295
HourLocator(5) # old: tick every 5 minutes
267
296
@@ -278,7 +307,7 @@ API CHANGES in matplotlib-0.63
278
307
that years are not recurrent.
279
308
280
309
281
- Financial functions:
310
+ Financial functions:
282
311
283
312
matplotlib.finance.quotes_historical_yahoo(ticker, date1, date2)
284
313
@@ -300,7 +329,7 @@ API CHANGES in matplotlib-0.60
300
329
ColormapJet and Grayscale are deprecated. For backwards
301
330
compatibility, they can be obtained either by doing
302
331
303
- from matplotlib.cm import ColormapJet
332
+ from matplotlib.cm import ColormapJet
304
333
305
334
or
306
335
@@ -355,15 +384,15 @@ available on PolyCollections, eg you can say
355
384
c.set_facecolor('r')
356
385
c.set_alpha(0.5)
357
386
358
- or
387
+ or
359
388
360
389
c = scatter(blah, blah)
361
390
set(c, 'linewidth', 1.0, 'facecolor', 'r', 'alpha', 0.5)
362
391
363
392
364
393
Because the collection is a single object, you no longer need to loop
365
394
over the return value of scatter or pcolor to set properties for the
366
- entire list.
395
+ entire list.
367
396
368
397
If you want the different elements of a collection to vary on a
369
398
property, eg to have different line widths, see matplotlib.collections
@@ -411,7 +440,7 @@ Axes creation
411
440
f = Figure(figsize=(5,4), dpi=100)
412
441
a = f.add_subplot(111)
413
442
414
- That is, add_axis no longer exists and is replaced by
443
+ That is, add_axis no longer exists and is replaced by
415
444
416
445
add_axes(rect, axisbg=defaultcolor, frameon=True)
417
446
add_subplot(num, axisbg=defaultcolor, frameon=True)
@@ -423,12 +452,12 @@ Artist methods
423
452
to draw
424
453
425
454
Bounding boxes
426
- --------------
455
+ --------------
427
456
428
457
matplotlib.transforms.Bound2D is replaced by
429
458
matplotlib.transforms.Bbox. If you want to construct a bbox from
430
459
left, bottom, width, height (the signature for Bound2D), use
431
- matplotlib.transforms.lbwh_to_bbox, as in
460
+ matplotlib.transforms.lbwh_to_bbox, as in
432
461
433
462
bbox = clickBBox = lbwh_to_bbox(left, bottom, width, height)
434
463
@@ -466,7 +495,7 @@ Object constructors
466
495
l = Line2D(dpi, bbox, x, y,
467
496
color = color,
468
497
transx = transx,
469
- transy = transy,
498
+ transy = transy,
470
499
)
471
500
472
501
now all you need is
@@ -502,7 +531,7 @@ Transformations
502
531
503
532
* because they operate on x and y together, they can do the entire
504
533
transformation in one loop. Earlier I did something along the
505
- lines of
534
+ lines of
506
535
507
536
xt = sx*func(x) + tx
508
537
yt = sy*func(y) + ty
@@ -520,8 +549,8 @@ Transformations
520
549
Likewise, if you are using the artist bounding boxes to pick items
521
550
on the canvas with the GUI, the bbox methods are somewhat
522
551
different. You will need to see the updated
523
- examples/object_picker.py.
524
-
552
+ examples/object_picker.py.
553
+
525
554
See unit/transforms_unit.py for many examples using the new
526
555
transformations.
527
556
@@ -559,12 +588,12 @@ API changes at 0.50
559
588
560
589
Migrating code:
561
590
562
- Matlab interface:
591
+ Matlab interface:
563
592
564
593
The only API change for those using the matlab interface is in how
565
594
you call figure redraws for dynamically updating figures. In the
566
595
old API, you did
567
-
596
+
568
597
fig.draw()
569
598
570
599
In the new API, you do
@@ -594,23 +623,23 @@ Migrating code:
594
623
FigureCanvas, not a Figure. The examples embedding_in_gtk.py,
595
624
embedding_in_gtk2.py, and mpl_with_glade.py all reflect the new
596
625
API so use these as a guide.
597
-
598
- All prior calls to
626
+
627
+ All prior calls to
599
628
600
629
figure.draw() and
601
- figure.print_figure(args)
630
+ figure.print_figure(args)
602
631
603
632
should now be
604
-
633
+
605
634
canvas.draw() and
606
- canvas.print_figure(args)
635
+ canvas.print_figure(args)
607
636
608
637
Apologies for the inconvenience. This refactorization brings
609
638
significant more freedom in developing matplotlib and should bring
610
639
better plotting capabilities, so I hope the inconvenience is worth
611
640
it.
612
641
613
-
642
+
614
643
615
644
API changes at 0.42
616
645
@@ -628,7 +657,7 @@ API changes at 0.42
628
657
backend_gtk for an example.
629
658
630
659
* Text._get_xy_display renamed Text.get_xy_display
631
-
660
+
632
661
* Artist set_renderer and wash_brushes methods removed
633
662
634
663
* Moved Legend class from matplotlib.axes into matplotlib.legend
@@ -646,7 +675,7 @@ API changes at 0.42
646
675
matplotlib.matlab.get_current_fig_manager to allow user access to
647
676
the GUI window attribute, eg figManager.window for GTK and
648
677
figManager.frame for wx
649
-
678
+
650
679
651
680
652
681
@@ -661,7 +690,7 @@ API changes at 0.40
661
690
* the clip_gc method is removed. Artists now clip themselves with
662
691
their box
663
692
* added _clipOn boolean attribute. If True, gc clip to bbox.
664
-
693
+
665
694
- AxisTextBase
666
695
* Initialized with a transx, transy which are Transform instances
667
696
* set_drawing_area removed
@@ -685,7 +714,7 @@ API changes at 0.40
685
714
* removed figbg attribute
686
715
* added fig instance to __init__
687
716
* resizing is handled by figure call to resize.
688
-
717
+
689
718
- Subplot
690
719
* added fig instance to __init__
691
720
0 commit comments