# HG changeset patch
# User Jason Grout <jason.grout@drake.edu>
# Date 1281801383 25200
# Node ID 64ca3b397c20b16c157fefd65c4c87a352e76a31
# Parent 5b338f2e484f2065d3d30d47bc204d6e9ed13d12
#9221: Update the way axes labels are calculated and number of colormaps for matplotlib 1.0
diff -r 5b338f2e484f -r 64ca3b397c20 sage/plot/colors.py
a
|
b
|
|
1230 | 1230 | 0 |
1231 | 1231 | sage: maps.load_maps() |
1232 | 1232 | sage: len(maps.maps) |
1233 | | 116 |
| 1233 | 134 |
1234 | 1234 | """ |
1235 | 1235 | global cm |
1236 | 1236 | if not cm: |
… |
… |
|
1274 | 1274 | sage: from sage.plot.colors import Colormaps |
1275 | 1275 | sage: maps = Colormaps() |
1276 | 1276 | sage: len(maps) |
1277 | | 116 |
| 1277 | 134 |
1278 | 1278 | """ |
1279 | 1279 | self.load_maps() |
1280 | 1280 | return len(self.maps) |
diff -r 5b338f2e484f -r 64ca3b397c20 sage/plot/plot.py
a
|
b
|
|
1861 | 1861 | # We set the label positions according to where we are |
1862 | 1862 | # drawing the axes. |
1863 | 1863 | if xaxis=='bottom': |
1864 | | yaxis_labely=1 |
| 1864 | yaxis_labely=subplot.get_ylim()[1] |
1865 | 1865 | yaxis_labeloffset=8 |
1866 | 1866 | yaxis_vert='bottom' |
1867 | 1867 | xaxis_labely=0 |
1868 | 1868 | xaxis_vert='baseline' |
1869 | 1869 | else: |
1870 | | yaxis_labely=0 |
| 1870 | yaxis_labely=subplot.get_ylim()[0] |
1871 | 1871 | yaxis_labeloffset=-8 |
1872 | 1872 | yaxis_vert='top' |
1873 | 1873 | xaxis_labely=1 |
1874 | 1874 | xaxis_vert='top' |
1875 | 1875 | |
1876 | 1876 | if yaxis=='left': |
1877 | | xaxis_labelx=1 |
| 1877 | xaxis_labelx=subplot.get_xlim()[1] |
1878 | 1878 | xaxis_labeloffset=8 |
1879 | 1879 | xaxis_horiz='left' |
1880 | 1880 | yaxis_labelx=0 |
1881 | 1881 | else: |
1882 | | xaxis_labelx=0 |
| 1882 | xaxis_labelx=subplot.get_xlim()[0] |
1883 | 1883 | xaxis_labeloffset=-8 |
1884 | 1884 | xaxis_horiz='right' |
1885 | 1885 | yaxis_labelx=1 |