|
47 | 47 | of original axes between colorbar and new image axes |
48 | 48 | *shrink* 1.0; fraction by which to shrink the colorbar |
49 | 49 | *aspect* 20; ratio of long to short dimensions |
| 50 | + *anchor* (0.0, 0.5) if vertical; (0.5, 1.0) if horizontal; |
| 51 | + the anchor point of the colorbar axes |
| 52 | + *panchor* (1.0, 0.5) if vertical; (0.5, 0.0) if horizontal; |
| 53 | + the anchor point of the colorbar parent axes |
50 | 54 | ============= ==================================================== |
51 | 55 |
|
52 | 56 | ''' |
@@ -838,15 +842,15 @@ def make_axes(parent, **kw): |
838 | 842 | x1 = 1.0-fraction |
839 | 843 | pb1, pbx, pbcb = pb.splitx(x1-pad, x1) |
840 | 844 | pbcb = pbcb.shrunk(1.0, shrink).anchored('C', pbcb) |
841 | | - anchor = (0.0, 0.5) |
842 | | - panchor = (1.0, 0.5) |
| 845 | + anchor = kw.pop('anchor', (0.0, 0.5)) |
| 846 | + panchor = kw.pop('panchor', (1.0, 0.5)) |
843 | 847 | else: |
844 | 848 | pad = kw.pop('pad', 0.15) |
845 | 849 | pbcb, pbx, pb1 = pb.splity(fraction, fraction+pad) |
846 | 850 | pbcb = pbcb.shrunk(shrink, 1.0).anchored('C', pbcb) |
847 | 851 | aspect = 1.0/aspect |
848 | | - anchor = (0.5, 1.0) |
849 | | - panchor = (0.5, 0.0) |
| 852 | + anchor = kw.pop('anchor', (0.5, 1.0)) |
| 853 | + panchor = kw.pop('panchor', (0.5, 0.0)) |
850 | 854 | parent.set_position(pb1) |
851 | 855 | parent.set_anchor(panchor) |
852 | 856 | fig = parent.get_figure() |
|
0 commit comments